spartikus spartikus - 1 year ago 121
Java Question

How do I force Chrome Postman to return application/xml instead of application/octect-stream

I am using google chrome plugin Postman for testing some restful web services. Some of my webservices have a produces annotation that has several types defined. Each time I run one of my services though, it seems postman's results are determined to always return in octect-stream form. Is there a way to force postman (or potentially my service) to return application/xml results? I would prefer not to change the annotation but will if thats my only choice.

My service definition -

"application/x-javascript", MediaType.APPLICATION_OCTET_STREAM } )
@Path( "/getCustomers/" )
public Response getCustomers

My postman call is just a GET call with no parameters on the header like this:


Answer Source

Maybe your default response type is octect-stream

Use the below http headers in POSTMAN

Accept: application/xml

Do the server validations based on Accept headers.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download