Content negotiation for open url

Are you missing a feature? Request its implementation here.
penguish
Posts: 1
Joined: Fri Jan 14, 2011 7:42 pm

Content negotiation for open url

Post 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.
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Content negotiation for open url

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply