The difference between get and post from zero-play Javaweb series 7web Server-----

Source: Internet
Author: User

Summarize the difference between get and post

    • The get parameter is passed through the URL and the post is placed in the request body.

    • A GET request passes a parameter in the URL that has a length limit, and the post does not.

    • Get is less secure than post because parameters are exposed directly to the URL, so it cannot be used to pass sensitive information.

      • Get requests can only be URL-encoded, while post supports multiple encoding methods

      • The GET request will be the browser active cache, while post supports multiple encoding methods.

      • The GET request parameters are kept intact in the browsing history, and the parameters in the post are not retained.

    • Get and post are essentially TCP links, and there is no difference. However, due to the HTTP rules and browser/server restrictions, they have shown some differences in the application process.
    • Get generates a TCP packet, and post generates two TCP packets.

The long said:

For the Get mode request, the browser will send the HTTP header and data in a concurrent delivery, the server response 200 (return data);

For post, the browser first sends the header, the server responds to the continue, the browser sends the data, and the server responds with a $ OK (return data).

The difference between get and post from zero-play Javaweb series 7web Server-----

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.