Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I try to get XML with my tRest component, so I set this :
But I have an HTTP 406 error.... I also tried to add Content-Type application/xml or Content-Type test/plain (because it's like this in postman) but it doesn't work... However it works perfectly in postman with just adding Accept : application/xml in the "Headers" part.
Can someone helps me with that ?
Thanks
Démarrage du job test_conf_event a 11:58 12/09/2019.
[statistics] connecting to socket on port 3860
[statistics] connected
200||{"id":-4772057240064483897,"login":"agirard","username":"Alain Girard","system":null,"client":"STA"}
<!doctype html><html lang="fr"><head><title>État HTTP 406 – Inacceptable</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>État HTTP 406 – Inacceptable</h1><hr class="line" /><p><b>Type</b> Rapport d'état</p><p><b>description</b> La ressource identifiée par cette requête n'est capable de générer des réponses qu'avec des caractéristiques incompatible avec la directive "accept" présente dans l'entête de requête.</p><hr class="line" /><h3>Apache Tomcat/9.0.21</h3></body></html>|406
[statistics] disconnected
Job test_conf_event terminé à 11:58 12/09/2019. [Code sortie=0]
Sorry it's in french but it returns : The ressource identify by this request is not able to handle answers only with caracteritics incompatible with the "accept" directive in the headers of the request.
I Already tried.. It doesn't work
As I said, it works perfectly in Postman with the Accept : "application/xml", when I do it without the Accept I get text in json format, but i want it in XML..
I also try your others solutions with charset and language, combine and not combine with the accept, it doesn't work...