Overview [1] [2]#
Content-Type is a HTTP Entity Header (HTTP Header Field) that indicates the media-type of the HTTP Body.Content-Type in the case of the HTTP HEAD method, the media-type that would have been sent had the HTTP Request been a HTTP GET.
In HTTP Responses, a Content-Type HTTP Entity Header tells the client what the media-type of the returned content actually is. Browsers MAY do MIME sniffing in some cases and will not necessarily follow the value of the Content-Type; to prevent this behavior, the header X-Content-Type-Options can be set to nosniff.
In HTTP Requests, (such as HTTP POST or HTTP PUT), the client tells the server what media-type of HTTP Body is being sent.
Content-Type = "Content-Type" ":" media-type
Media types are defined in section 3.7. An example of the field is
Content-Type: text/html; charset=ISO-8859-4
More Information#
There might be more information for this subject on one of the following:- [#1] - 14.17 Content-Type
- based on information obtained 2016-06-25-
- [#2] - Content-Type
- based on information obtained 2017-07-12