What is the Value of 'Accept Header' when we try to hit our post service

Info : For all PUT/POST requests an accept header should be provided, otherwise an empty response body will be returned.

So What is the Value of the Accept Header??

You do not need to add the Accept header in every case.
E.g. if you only want to perform an update via a PUT request but you do not need the result of the update, then you can save some bandwidth by skipping the Accept header.

If you want to have the response of your request in JSON format, just add an Accept header with e.g. application/json to your request.
Something like */* might work as well, but an actual MIME type would be best.


When you do GET requests you also do not need to provide an Accept header as it is obvious that you want to get a response in case of GET. So on get C8Y always acts as if you have set an application/json Accept header.

This topic was automatically closed after 1083 days. New replies are no longer allowed.