Console output "Media type Error Exception" When sending an HTTP request

Source: Internet
Author: User


Type format:

type/subtype (;p arameter)?  type  1 

Subtype subtype, arbitrary string, such as HTML, if the * number represents all;  
parameter optional, some parameters, such as the Q parameter of the Accept request header, Content-type the charset parameter.

example:

content-type: text/html;charset:utf-8;1 

    text/html : html format     text/plain : Plain text Format            text/xml :  xml format     text/ X-markdown:markdown format     image/gif :gif image format          image/jpeg :jpg picture format      image/png:png picture format 1234567

 application/xhtml+xml :xhtml format    application/xml     :  xml data Format    application/atom+xml  :atom xml aggregation format         application/json    : json Data Format    application/pdf        :pdf format      application/msword  :  word Document Format    application/octet-stream :  binary stream data (such as common file downloads)     Application/x-www-form-urlencoded : <form enctype= "" > The default enctype,form form data is encoded in 12345678

    multipart/form-data : 
When you need to upload a file in a form, you need to use that format. These are some of the content-type content formats that we often use in our daily development.





Console output "Media type Error Exception" When sending an HTTP request

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.