Ajax of Text/plain, application/x-www-form-urlencoded and Application/jsonIn the HTTP request, if it is a GET request, then the form parameter is appended to the URL in the form of name=value&name1=value1, and if it is a POST request, then the form
The HTTP request method provided by the HTTP/1.1 protocol has options,, POST, PUT, DELETE, TRACE, CONNECT. Where post is typically used to submit data to the server, this article discusses several ways to submit data in the post.We know that the
1. How to handle garbled charactersIn the case of an interface test, when using the HttpClient POST request, for Content-type:application/json, you only need to specify the appropriate encoding for the header information and the POST request when
Description: Both are the format instructions for sending the request
1.application/x-www-form-urlencoded
In the syntax of a FORM element, enctype indicates that the format of the submitted data uses the Enctype property to specify the type of
application/x-www-form-urlencoded Multipart/form-data Text/plainWhy add a property to the form that uploads the file enctype the format type of the data response returned by the backgroundUpload a file in the form to add attributes Enctype=
When learning elements, the enctype attribute has three valuesEnctype attribute table:
value /th>
application/x-www-form-urlencoded
Encode all characters before sending (default)
--------------------------------------------------------------------------------------The meaning of enctype= "Multipart/form-data" in the form is to set the MIME encoding of the form. (for file upload)
By default, this encoding format is
In essence, Java.net.UrlEncoder is useful when converting a String to a static method in the Application/x-www-form-urlencoded MIME format, using theBut! In general, the Web application, when your server, page encoding, the request when the code has
In the syntax of the form element, Enctype indicates that the format for submitting data uses the Enctype property to specify the type of encoding the browser will use when sending data back to the server. Below is the description: application/x-www-
application/x-www-form-urlencoded: The form data is encoded as a name/value pair. This is the standard encoding format.Multipart/form-data: The form data is encoded as a message, and each control on the page corresponds to a part of the message.text/
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.