REST API - Use the “Accept: application/json” HTTP Header

后端 未结 4 1219
抹茶落季
抹茶落季 2020-12-08 10:08

When I make a request, I get a response in XML, but what I need is JSON. In the doc it is stated in order to get a JSON in return: Use the Accept: application/json

4条回答
  •  离开以前
    2020-12-08 10:27

    Basically I use Fiddler or Postman for testing API's.

    In fiddler, in request header you need to specify instead of xml, html you need to change it to json. Eg: Accept: application/json. That should do the job.

提交回复
热议问题