#Content Type vs Accept in Request Header

Accept : Tells the server  what the media type client needs as response.

“Accept”: text/html —Client expects the response as text/html.

Content-Type : Tells the server what media type the client sends when making a request.This is useful for server so that it can parse the request accordingly.

“Content-Type” :application/json –Client tells the server that it sending input as json.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s