How to retrieve certain content-type from a presto call?

igo
igo's picture
User offline. Last seen 49 weeks 3 days ago. Offline
Joined: 09/23/2008
Points: 157
igo asks:

Question

Hi!

Let's say I have this mashup that outputs XML. My JUMP request includes header:{'resultFormat':'xml'} but the thing here is that the browser displays it as text therefore the response is sent to responseText instead of responseXML. How do I change the headers of prestos's response

Thanks in advance,

igo

Deepak Alur
Deepak Alur's picture
User offline. Last seen 1 week 4 days ago. Offline
Joined: 09/09/2008
Points: 565

There is an option to request the result in 'native' format. Have you tried that?

smitchell
smitchell's picture
User offline. Last seen 11 hours 1 min ago. Offline
Joined: 08/29/2008
Points: 34

Not sure if this fits your use case, but you can add HTTP headers to the response from a mashup service. So one way is to wrap your service with a mashup.

In the mashup, you define the response headers with names that begin with "httpResponse.{header name here}". These can be HTTP headers, or custom headers. Custom headers names must begin with X.