Learn SpringMVC -- GET Request Parameters and springmvc get Parameters
@ RequestParam, you must have seen it; @ PathVariable, you certainly know it; @ QueryParam, why don't you know it ?! You are also familiar with him (@ CookieValue )! She (@
1. Get the parameters in the URL path
Requirement: assume that the user accesses 127.0.0.1/user/1/2. What should I do?
(1) unnamed parameters (location parameters)
# URLs in the project. add settings under py: URL (R' ^ user/(\ D +) $ ', views.
Write it in front.
When we use Ajax, when we send data to the server, we can request the server using GET, or we can use post to request the server. So, when should we adopt the Get method, when should we use the Post method?
The
In form submission, the difference between ASP. NET get and post methods is as follows:
1. Get is to get data from the server, and post is to send data to the server.
2. Get is to add the parameter data queue to the URL referred to by the Action
Original address: http://www.cnblogs.com/xiaoxi/p/5695783.html1, directly the parameter of the form is written in the parameters of the controller corresponding method, applicable to the Get method submission, not for post mode submission. /**
The example in this article describes a workaround for the angularjs occurrence of a $http asynchronous background failure to obtain request parameter problems. Share to everyone for your reference, specific as follows:
Angular uses a different
@RequestParam, you must have seen @PathVariable, you must know @QueryParam, how could you not know? And you know him (@CookieValue)! She (@ModelAndView)! It (@ModelAttribute)! Yes, just annotating this piece, Spring MVC opens up a colorful world for
In 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 parameter is in the request body, also in the name=value&name1= The form
1, the synchronization request can request data from the Internet, once the synchronization request is sent, the program will stop the user interaction until the server returns the data to complete before the next operation,
2, the asynchronous
The main purpose of WEBAPI is to pass "specified parameters" into "API backend", API receive parameters, "corresponding business logic processing", "return results". So how to pass the argument, or the popular saying, the HTTP request should be how
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.