Rest APIs : REST API : Getting started : REST headers : Understanding the Accept header
Understanding the Accept header
The Accept header describes which format you want a response body to arrive as. For example, responses can be delivered either as XML or JSON by modifying the Accept header. This header is required in all requests.
A response is any reply from to your application. expects one of these values as the Accept header:
To receive JSON in a response body, use application/json.
To receive XML in a request body, use application/xml.