Service Virtualization

 View Only

Content-Type in API Response

  • 1.  Content-Type in API Response

    Posted Mar 14, 2016 11:18 AM

    Hi, I have sample request and response in json format, have gone and created images and have chosen json as document type on body.

    Consumers consuming this service needs response in xml format so I have included content-type as application/xml in response meta. When tested I am still getting response as JSON and not XML. If I change it other way to include xml in the response and make content-type to be application/json we get json. Shouldn't this work either ways? If not is there a way to get back xml response when I have json response in vsi?