lookup> Content-Type

Content-Type

indicates the media type of the associated representation: either the representation enclosed in the message payload or the selected representation, as determined by the message semantics.

表示头RFC7231#3.1.1.5
NameContent-Type
Type表示头
SpecificationRFC7231#3.1.1.5

indicates the media type of the associated representation: either the representation enclosed in the message payload or the selected representation, as determined by the message semantics.

Content-Type: application/json; charset=utf-8

RFC7231#3.1.1.5

What does the Content-Type header do?

indicates the media type of the associated representation: either the representation enclosed in the message payload or the selected representation, as determined by the message semantics.

Is Content-Type a request or response header?

It is classified as a representation header and can appear in requests or responses depending on context.

Related status codes

Related methods

Related headers

Related MIME types