Page 1 of 1
Content negotiation for open url
Posted: Fri Jan 14, 2011 7:48 pm
by penguish
when querying a restful service (using the 'Open URL...' item) which implements content negotiation via the Accept: header, it would be useful to be able to choose the Accept: header to send, so I can, for example, debug both the xhtml and xml returned by my service.
Re: Content negotiation for open url
Posted: Mon Jan 17, 2011 10:53 am
by Radu
Hi,
So the two accept headers set by default by Oxygen are:
Code: Select all
Accept-Encoding: gzip
Accept-Ranges: bytes
And you would like to have control over the accept headers to specify to the server to return either xhtml or xml. Do I understand correctly the usecase? This is kind of low level for an XML editor.
What you could do for example would be to pass through an intermediary CGI or PHP script to which you would pass query parameters like:
http://myserver/redirect.php?accept="xml"
and that script would then set the query value in the header parameters, call the web service and return its content. Just an idea.
Regards,
Radu