Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 978 Bytes

HTTP.md

File metadata and controls

49 lines (37 loc) · 978 Bytes

HTTP

  • A request is from the client side.

    GET /search?name=abc HTTP/1.1
    Accept: text/html
  • A response is from the server side.

    HTTP/1.1 200 OK
    Content-type: text/html
    
    <!DOCTYPE html?
    <html lang="en">
    ...
    </hmtl>
  • Architecture

    +------------------------------+
    | Server                       |
    +------------------------------+
    |                              |
    | +----------+---------------+ |
    | |TCP Listener              | |
    | +----------+---------------+ |
    |                              |
    |                              |
    | +----------+---------------+ |
    | |HTTP Parser               | |
    | +----------+---------------+ |
    |                              |
    |                              |
    | +----------+---------------+ |
    | |Handler                   | |
    | +----------+---------------+ |
    |                              |
    +------------------------------+