Accept header must be application/json code example
Example 1: what is accept header in rest api
`Accept Header` can be used to ask the server to return
different type of response format
For example :
`/api/xname` endpoint , support both xml and json
as response type so we can add accept header `application/xml`
to get xml result and `application/json` result.
If server does not support such type ,
it will return `406`(not acceptable) status code.
Example 2: content-type header api
Content-Type header is used in POST , PUT , PATCH to
specify the type of body you are sending
to the serve and it's required.
Example 3: accept header json
`Accept Header` can be used to ask the server to return
different type of response format
For example :
`/api/xname` endpoint , support both xml and json
as response type so we can add accept header
`application/xml` to get xml result and `application/json` result.
If server does not support such type ,
it will return `406 not acceptable` status code.