Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Cant get JSON response from Rest request

SOAtoad
SOAtoad Posts: 14

I have a client who is unable to have their JSON request return a JSON formatted response, rather, it responds in XML format.
They have provided the appropriate header listed out in: https://docs.parasoft.com/display/SOAVIRT9106CTP312/Testing+RESTful+Services+1

However, it is no working properly.

Could they be missing something? Should they instead use a Messaging Client?

Comments

  • OmarR
    OmarR Posts: 233 admin

    The header "accept: application/json" should be enough for the service to return JSON.

    It could be that the service requires an additional or different content type for the header. It could also be possible that the service doesn't support JSON for that particular call.

    Do you see any difference in response when using a messaging client and a REST client?