Content-Type: several commonly used data encoding formats

Content-Type:

Used to define how a user’s browser or related device displays data to be loaded, or how to handle data to be loaded.

Content type, generally refers to the content-type that exists in a Web page, and the content-type attribute specifies the HTTP content type of request and response.

If no Content-Type is specified, the default is text/html.

1. text/html:

text/html:Set the Content-Type of the file to the form of text/html, and the browser automatically calls the HTML parser to process the file when it gets the file.

2. text/plain:

text/plain:Set the file to plain text, and browsers do not process it when they get it.

3. application/x-www-form-urlencoded

4. multipart/form-data

5. application/json

6. text/xml

 

Leave a Reply

Your email address will not be published. Required fields are marked *