Closed sikhsra closed 7 years ago
I think it depends on the server you are sending the request too.
It's of course possible to send an empty POST request with the header Content-Type: application/json
but it would not be unreasonable for a server respond with 400 bad request.
When hitting POST method without body(as per requirements) it gives 400 bad request with contentType as application/json. Is there a way to call empty POST with contentType as application/json?
{ method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }