HTTP Request Structure and Methods

Overview of HTTP Requests Methods and Structure

HTTP is the protocol that is used by web servers and browsers to communicate. HTTP is used to structure requests and responses over the internet. HTTP is based on a request and a response.

HTTP Request is a packet of binary data sent by the Client to the server; a command that your web browser sends to a web server in order to retrieve a web page. An HTTP client sends an HTTP request to a server in the form of a request message. When you send an HTTP request, your web browser provides a wide range of information about your computer.

If you fill in a web form and press Submit, then the HTTP request also contains the data that you have entered on that form.

HTTP requests and responses share a similar structure and are composed of:
  • A start-line describing the requests to be implemented, or its status of whether successful or a failure. This start-line is always a single line.
  • An optional set of HTTP headers specifying the request, or describing the body included in the message.
  • A blank line indicating that all meta-information for the request has been sent.
  • An optional body containing data associated with the request (like the content of an HTML form), or the document associated with a response. The presence of the body and its size is specified by the start-line and HTTP headers.
The start-line and HTTP headers of the HTTP message are collectively known as the head of the requests, whereas its payload is known as the body. The most commonly used HTTP Headers are Accept-Encoding (or Accept-Charset), Accept-Language, Host, and User-Agent.

Here is a list of some important Request-header fields that can be used based on the requirement:
  • Accept-Charset
  • Accept-Encoding
  • Accept-Language
  • Authorization
  • Host
  • Referer
  • User-Agent
The HTTP specifications are in constant change, and one of the possible changes that come with each new specification is the "HTTP Methods". Each HTTP Method (or Verb) designs an action that coupled with its headers will tell the server how to respond.

  • HTTP GET: Requests a representation of the specified resource (Document, HTML Page, Picture, JSON, XML...). Using the GET method should only retrieve data and should have no other effect.
  • HTTP POST: Requests that the server accepts the data enclosed in its request body as a new resource to be persisted on its end. The data POSTed might be for instance a new user that registered in your website, a new message on an instant messaging app, a comment on a thread, etc. Usually speaking, it's something that the server will store on its end for later consumption, processing or usage.
  • HTTP HEAD: The HEAD request is identical to the GET request, but instead of receiving the full payload of the response, it receives only meta-information about the server (also known as the response headers). This is useful for understanding what is running on the server (or how it reacts to different requests), without having to transport the entire content of a standard response.
  • HTTP PUT: Similar to the POST request, but this one supplies a URI (identifier) that should be used by the server to persist the object transported by the PUT request. The catch here is that if an object with the same URI already exists on the server side, it should be overwritten by the one received (this operation is also known as UPSERT or Merge operation. If the record does not exist, it will be inserted, otherwise it will be updated).
  • HTTP DELETE: Requests the deletion of the specified resource
  • HTTP OPTIONS: Requests the HTTP methods and actions supported by the server for one specific URL
  • HTTP TRACE: Bounces the issued request to the server and back again. This is useful for understanding whether any intermediate servers made any changes to the request you issued before it reached the target.
The request-header fields allow the client to pass additional information about the request, and about the client itself, to the server. These fields act as request modifiers. The HTTP request can be sent via normal or via a secure channel (HTTP over SSL). If your URL starts with https:// then the HTTP request is sent via the encrypted connection.

There are different tools to monitor and analyze all incoming and outgoing HTTP traffic between the browser and the web servers. To visualize your data over HTTP into clearly organized and easily understood charts, tables, and other visualization widgets you can use our HTTP Debugger Pro.

HTTP Debugger Pro is a handy tool that allows IT professionals to intercept and analyze:
  • All outgoing http requests
  • The http request header parameter values.
  • The http request and http response of any popular web browser (Internet Explorer, Mozilla Firefox, Opera etc) and its plug-ins.
  • The http request and response of any custom software program.
  • The http request sent by a system service.


Copyright Notice: Please don't copy or translate this article without prior written permission from the HTTPDebugger.com

HTTP Debugger is a proxy-less HTTP analyzer for developers that provides the ability to capture and analyze HTTP headers, cookies, POST params, HTTP content and CORS headers from any browser or desktop application. Awesome UI and very easy to use. Not a proxy, no network issues!
Download FREE 7-Day Trial

HTTP Debugger

HTTP Debugger - Professional HTTP Analyzer Debug HTTP API calls to a back-end and between back-ends. Very easy to use. Not a proxy, no network issues! Download Free Trial