What's the difference between mediatype, conte

2020-02-17 11:13发布

问题:

Is there a difference between mimetype, contenttype and mediatype? (Java's JAX-RS MediaType).

From the wikipedia article i gathered that it's only a content-type in the context of e.g. HTTP requests as a field in a request's header: So are these just synonyms or are there any actual semantic differences between the different terms?

回答1:

(Internet) Media Type is the proper technical term.

Content-Type is the name of the HTTP header field used to specify the media type.

MIME Type is the former name for Media Type.



回答2:

Content-Type is an HTTP message header and its value is (generally) a MIME Type.

JAX-RS MediaType seems to be a Java rewrite for common MIME Types.