When creating a web service that returns JSON, we should return the content type to the client. We can do this by setting the content-type header in HTTP. code example
Example: 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.