java web of get and post (notes)

W3CSchool

Request between the client and the server - response, the two most commonly used methods are: GET and POST.

  • GET - request data from the specified resource.
  • POST - submission of data to be processed to the specified resource

 

GET method

Please note that the query string (name / value pairs) are sent in the URL GET request:

 

  • GET requests related to some of the other comments:

    • GET request can be cached
    • GET requests remain in browser history
    • GET requests can be bookmarked
    • GET requests should not be used when processing sensitive data
    • GET requests have length restrictions
    • GET requests should only be used to retrieve data

POST method

Please note that the query string (name / value pairs) are sent in an HTTP POST request message body:

  • POST requests related to some of the other comments:

    • POST request will not be cached
    • POST requests are not retained in the browser history
    • POST can not be bookmarked
    • POST request data length is not required

GET the parameters contained in the URL, POST pass parameters by requestbody.

 

Other HTTP request methods

The following table lists some other HTTP request methods:

 

Guess you like

Origin www.cnblogs.com/zxin1210/p/11688945.html