Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3667

Is Accept header needed for a POST method which doesn't return any content to client?

$
0
0

I have an endpoint which supports POST method with content-type as JSON (only). But the POST request doesn't return any content in its response body other than status codes. In this scenario, what is the correct behavior?

  1. Client sends POST with Accept header as application/json
  2. Client sends POST with Accept header as application/xml

Should the server return error in case 2?


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>