Forum Discussion
- SmartBear_SuppoSmartBear Alumni (Retired)Hi,
The response you receive will depend on the content-type your service is set to return. Perhaps a parameter in your request would indicate to the service that a text/json response should be return. It will depend on whether that option is implemented.
Regards,
Giscard
SmartBear Support - gaganchawlaOccasional ContributorHow to override content-type to text/json if I want to.
- SmartBear_SuppoSmartBear Alumni (Retired)Hi,
This question sounds similar to this post:
viewtopic.php?f=2&t=23494
You need to override the Accept header and use value text/json in the request. See screen shot attached for example.
Regards,
Marcus
SmartBear Support - gaganchawlaOccasional Contributor
- SmartBear_SuppoSmartBear Alumni (Retired)Hi,
Are you getting an error when using Accept applicaton/json header? Do your service produce json as a response?
Regards,
Marcus
SmartBear Support - gaganchawlaOccasional ContributorThe server do produce the result in application/json, I tried updating the headers via charles, a proxy dbugging tool, and it worked, but not with SoapUI.
I am not getting an error it just keep displaying the same headers text/html in the response. - SmartBear_SuppoSmartBear Alumni (Retired)Hi,
Then maybe something is not correct with the url you are using SoapUI Pro. If you are able to get json returned outside of SoapUI Pro check the request you are doing such as the headers and url versus the request you see in SoapUI Pro. I am able to get json returned with no problem using the Google Maps REST API in SoapUI Pro.
Regards,
Marcus
SmartBear Support