Hypertext Transfer Protocol

From bildr

Jump to: navigation, search

Contents

Overview

HTTP (Hypertext Transfer Protocol) is an application layer networking protocol, and the foundation for data communication on the World Wide Web. HTTP is part of the Internet Protocol Suite, and often sent via the Transmission Control Protocol (TCP).

HTTP is governed by the Internet Engineering Task Force (IETF) and the World Wide Web Consortium spanning a series of Requests for Comments (RFCs), such as [RFC 2616] defining HTTP/1.1.


Technical Detail s

HTTP is an application layer protocol utilizing a request-response method through the client-server computing model. For instance, a web browser offers the client connection, also referred to as a User Agent (UA), while a web server hosting the web site acts as the server connection.

HTTP/1.0 initiates a separate connection for every data request, while HTTP/1.1 can reuse a connection, experiencing less latency.

HTTP protocols

HTTP functions through a "session", which is a series of request-response network transactions. The client initiates a request, typically via TCP and defaults to port 80. The server will send back a status message (commonly HTTP/1.1 200 OK) followed by a message such as an error or the requested data.


A request message can consist of four parts:

  1. Request; GET image.jpg HTTP/1.1
  2. Header; Accept-Language: enr
  3. empty line
  4. message body (optional)

The request line, header, and empty line must end with <CR><LF> (carriage return, line feed)


HTTP also defined nine methods ("verbs") that define potential actions.

  1. HEAD - asks for a response (GET response with no body). Used for retrieving meta-data.
  2. GET - asks for the retrieval of a resource
  3. POST - submits data for processing
  4. PUT - uploads information for a resource
  5. DELETE - deletes a resource
  6. TRACE - echos the previous request
  7. OPTIONS - returns the methods supported by the server
  8. CONNECT - converts the connection to a transparent TCP/IP tunnel, usually for using HTTPS
  9. PATCH - modifies a resource

Links

RFC2616 - HTTP/1.1

This page is an Article on bildr. Articles are pages that define or explain a concept, method, or generic item.

NOTE: All information contained within this article is pure opinion. Although this article is intended to help people, it may contain faulty or misleading information. This article is not to be considered professional opinion or advice, and is in no way a replacement for reading all safety/instructional documentation. Always remember to protect yourself when handling/using hazardous materials, as well as test new techniques before using them on projects/work intended to be handed in or used.

bildr and its contributers take NO responsibility for the information contained within.