HTTP Overview

Vừa học kiến thức, vừa rèn luyện tiếng anh! Còn gì tuyệt vời hơn nữa 😊😊😋 
  1. HTTP Overview
  2. HTTP Parameters
  3. HTTP Messages
  4. HTTP Requests
  5. HTTP Responses
  6. HTTP Method
  7. HTTP Status Codes
  8. HTTP Header Fields
  9. HTTP Caching
  10. HTTP URL Encoding
  11. HTTP Security
  12. HTTP Message Examples


    The HyperText Transfer Protocol (HTTP) is an application-level protocol for distributed (phân phối), collaborative (cộng tác), hyper-media information systems. This is the foundation for data communication for World Wide Web (i.e. internet) since 1990. HTTP is a generic and stateless (phi trạng thái) protocol which can be used for other purposes as well using extensions of its request methods, error codes and headers.
    Basically, HTTP is a TCP/IP based communicate protocol, that used to deliver (phân phối) data (HTML files, image files, query results, ect.) on the WWW. The default port is TCP 80, but other ports can be used as well. It provides a standardized way for computers to communicate with each other. HTTP specification specifies how clients' data will be constructed and send to the server, and how to the servers response  these requests.

Basic features:

   There are three features that make HTTP a simple but powerful protocol:



  • HTTP is a connectionless (kết nối không liên tục): The HTTP client, i.e., a browser initiates an HTTP request and after a request is made,  the client disconnects from the server and waits for a response. The server processes the request and re-establishes  (thiết lập lại) the connection with the client to send a response back. 
  • HTTP is media independent (phương tiện độc lập): It means, any type of data can be sent by HTTP as long as both the client and the server know how to handle the data content. It's required for the client as well as the server specify the content type using appropriate (thích hợp) MIME-type.
  • HTTP is a stateless: As mentioned above, HTTP is connectionless and it's a direct result HTTP being a stateless protocol. The client and the server are aware of each other during a current request. Afterwards, both of them forget about each other. Due to this nature of the protocol, neither the client nor the server can retain (ghi nhớ) information between different requests across the web pages.
Note: HTTP/1.0 uses a new connection for each request/response exchange (trao đổi) where as HTTP/1.1 may be used for one or more request/response exchanges.

Basic Architecture:

    The following diagram shows a basic architecture of a web application and depicts (miêu tả) where HTTP sits:

HTTP Architecture

    The HTTP is a request/response protocol based on the client/server based architecture where web browsers, robots, search engines,  ect., act like HTTP clients and the Web server acts like servers.

Client

    The HTTP client sends  a request to the server in the form of a request method, URI, and protocol version followed by a MIME-like message containing the request modifiers, client information, and possible body content over a TCP/IP connection.

Server

    The HTTP server responds with a status line, including the message's protocol version and a success or error code followed by a MIME-like message containing server information, entity meta information , and possible entity-body content.

Tham khảo: tutorialspoint.com

0 nhận xét:

Đăng nhận xét