Ajax parameters appear in Request payload cause request.getparameter (name) to get a value that is not

Source: Internet
Author: User
Tags http post

Reference: Http://stackoverflow.com/questions/10494574/what-is-the-difference-between-form-data-and-request-payload

If a request (typically POST) have Content-type header set to application/x-www-form-urlencoded the body was expected to be In the form of a, querystring with url-encoded Key=value pairs joined by &. Form Data section then shows the Key-value parameters (when viewed parsed). This-is-much more common in past because it's a default for HTML forms.

Other cases is shown in Request payload sections (and nowadays parsed for readability as well for common formats like JSON ).

If the requested Content-type is set to application/x-www-form-urlencoded, then this post request is considered an HTTP post form request and the parameters appear in the

In other cases, if a POST request that uses a native AJAX does not specify a request header, the default Content-type is Text/plain;charset=utf-8, and the parameter appears in the request payload block.

Ajax parameters appear in Request payload cause request.getparameter (name) to get a value that is not

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.