What would a body in an HTTP GET look like?

This question already has an answer here:

  • HTTP GET with request body 18 answers

  • The URL wouldn't change by adding a body to the HTTP request. In addition to the normal HTTP headers your request would also include a body (separated from the header by a blank line).

    I would strongly recommend that you DON'T do this with GET requests though - it is not well treated with HTTP servers and is somewhat wrong if you want to follow and respect the HTTP specification.

    A simple request would look something like this:

    GET /whatever HTTP/1.1
    Host: foobar.com
    User-Agent: Selfmade telnet
    Connection: close
    
    hello world
    
    链接地址: http://www.djcxy.com/p/71456.html

    上一篇: 如何通过使用JAX的GET调用发送有效内容

    下一篇: HTTP GET中的主体是什么样的?