Spring Learning 12 application/x-www-form-urlencoded or Application/json

Source: Internet
Author: User

application/x-www-form-urlencoded or Application/json?

What is the format of Get and POST?

How do I get these values in the background?

How do I send these requests using AJAX or postman?

11.2.3 To perform a rest action:

A) GET, post method, according to the request header Content-type value to determine:

application/x-www-form-urlencoded, Optional (that is, not necessary, because the data of this situation @requestparam, @ModelAttribute can also be processed, of course @requestbody can also handle);

Multipart/form-data, cannot be processed (i.e. using @requestbody cannot process data in this format);

Other formats must be (other formats include application/json,application/xml, etc.). Data in these formats must be handled using @requestbody);

B) When the put method is submitted, it is judged by the value of the request header Content-type

Application/x-www-form-urlencoded, must;

Multipart/form-data, unable to deal with;

Other formats, you must

public void Putuser (@RequestBody final userwsdto user) throws duplicateuidexception{}

Spring Learning 12 application/x-www-form-urlencoded or Application/json

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.