TCP/IP Volume 3-HTTP (note)

Source: Internet
Author: User
Tags response code

1. HTTP request format:

Request-line

Headers (0 or multiple)

<Blank line>

Body (valid only for post requests)

The request-line format is:

Request request-Uri HTTP Version Number

1) For a GET request, return any information specified by request-Uri.

2) A head request is similar to a GET request, but the server program only returns the header information of the specified document, excluding the actual document content. This request is usually used to test the correctness, accessibility, and recent modifications of hypertext links.

3) post requests are used to send emails, news, or forms that can be filled by interactive users. This is the only request to send the body in the request. When using post requests, you must specify in the Content-Length Field of the Message Header

Body length.

2. HTTP/1.0 response format:

Status-line

Headers (0 or more)

<Blank line>

Body

The status-line format is:

HTTP Version: Response-code response-phrase

3. Header field:

The packet header can be divided into three types: request, response, and description subject.

4. Response Code



References:

TCP/IP details Volume 3

Thomesca (beicai): http://blog.csdn.net/thomescai
(Reprinted and retained)

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.