当前位置:网站首页>Differences between get and post request modes

Differences between get and post request modes

2022-06-24 18:34:00 Dolphins love cats I

GET

        1.  Semantics is to get

        2. GET  How to carry parameters  queryString,  Splice directly behind the address bar ,  No more requests in the body

        3. GET  Theoretically, carrying data is infinite ,  But because the browser address bar is limited , IE 2KB

        4. GET  Will be actively cached by the browser

        5. GET  Send in clear text

        6. GET  Can only send  url  Encoded data (ASCII  code ),  If it is Chinese, it will automatically transcode

  POST

        1.  Semantics is to

        2. POST  Carrying time is  requestBody,  There is no... In the address bar ,  In the request body

        3. POST  Theoretically, the data carried is infinite ,  But it will be limited by the server

        4. POST  Requests are not actively cached by the browser ,  Unless manually set

        5. POST  Dark text transmission

        6. POST  In theory, you can send data in any format ,  But it has to do with the request header  content-type  Matching

Common request methods

      HTTP/1.0

        1. GET  :  Prefer the way of acquisition

          +  Most of them give back-end parameters ,  Used to get some columns of data

        2. POST :  Prefer to give the server some data

          +  Most of them log in ,  Give the server some information ,  You give me a simple result

        3. PUT  :  Prefer to give the server some information ,  But it is to add and use

          +  Most do registration ,  Give the server some information ,  You save this information

        4. HEAD :  Used to get server header information

      HTTP/1.1

        5. DELETE :  Prefer to delete

          +  Mostly delete comments ,  Delete micro-blog

        6. CONNECT:  Pipe connection changes proxy connection usage

        7. PATCH  :  Prefer to give the server some information ,  Prefer to modify some information

          +  Most of them are used to improve user data

        8. OPTIONS:  Used to obtain server performance ,  However, the server's consent is required

原网站

版权声明
本文为[Dolphins love cats I]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211333373413.html