Postman Test SPRINGMVC RESTful style service-side interface always get no value

Source: Internet
Author: User

Receive parameters in the background interface using DataObject (contains a string-type attribute data)

Servletrequestdatabinder Binder = new Servletrequestdatabinder (new DataObject ()); Binder.bind (Request);

Then use the postman in the same way to pass the parameters:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/DA/wKioL1Xuzr_hTUXEAAEfIlhiUhY480.jpg "title=" Untitled. png "alt=" wkiol1xuzr_htuxeaaefilhiuhy480.jpg "/>

You can see that the resulting return value is null, and that, depending on background debugging, you do not get the parameters passed in. Cut back to x-www-form-urlencoded mode and write this object as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/DA/wKioL1Xuz8jwhaCSAAJJnCSH6tQ099.jpg "title=" Untitled. png "alt=" wkiol1xuz8jwhacsaajjncsh6tq099.jpg "/> It can be found that this method is required to test the parameters of JSON-to-image mode.

Note: The background here is received as a variable of the string type of data, not an object containing variables such as Phonenum.

This article is from "Rookie Learning" blog, please make sure to keep this source http://biyusheng.blog.51cto.com/2626140/1692867

Postman Test SPRINGMVC RESTful style service-side interface always get no value

Related Article

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.