Javatpoint Logo
Javatpoint Logo

Parameters of HTTP

In this section, we will discuss various HTTP parameters and their syntax. For example, date and time format, character set, etc. These parameters are used in the construction of our request and response message while writing the HTTP program of the client or server.

The various parameters of HTTP are as follows:

HTTP Version

To indicate the version of the protocol, HTTP uses a <major>.<minor> numbering scheme. The protocol versioning policy allows the sender to indicate the format of a message and its capacity for understanding further HTTP communication.

The first line in the HTTP-Version field indicates the version of the HTTP message.

Syntax

Example

Entity Tags

Entity tags are used to compare two or more entities from the same requested resource.

Syntax

An Entity tag must be unique across all the entity versions associated with a particular resource.

Date/Time Formats

Date/Time format can be defined in two ways:

1) Full Date:

All the date/time stamps of HTTP MUST be represented in Greenwich Mean Time (GMT). HTTP application has three different formats for the representation of date/time stamps:

In HTTP, GMT is exactly equal to UTC (Coordinated Universal Time), which was indicated in the first two formats by the inclusion of "GMT".

2) Delta Second

Some fields of HTTP header allow a time value, which is specified as an integer number of seconds, which will be in decimal after the time that the message was received.

Uniform Resource Identifiers (URI)

URI is simply formatted case insensitive string, which contains the name, location, etc. to identify the website or web server.

Syntax:

Here,

  • "http" scheme is used to locate network resources through the HTTP protocol.
  • If the port is empty, the port is assumed to 80. If abs_path is empty, it is equivalent to anabs_pathof "/". Characters in the "unsafe" and "reserved" sets are equivalent to their ""%" HEX HEX"encoding.
  • Comparisons of host names MUST be case-insensitive.

Example:

Character Set

The Character set is used to specify the character set that the user prefers. Using comma, multiple character sets can be separated. HTTP character sets are identified using the case ?insensitive tokens.

Example

Content Codings

Content coding values are used to show an encoding transformation that has been applied to an entity. Primarily, content-codings are used to allow a document to e compressed or transformed without losing the information. In content-coding, an entity is stored in coded form, transmitted directly, and only the recipient it encoded.

All the values of content-coding are case-insensitive. In the Accept-Encoding and Content-Encoding header fields, HTTP/1.1 uses content-coding value.

Example

Transfer Codings

The values of transfer coding are used to indicate an encoding transformation that has been applied to an entity to ensure "safe transport" through the network. Transfer coding is different from content coding. Transfer coding is the property of the message, and it is not the original entity.

Syntax:

In Transfer coding, parameters are in the form of attribute/value pairs.

Example:

All the values of Transfer coding are case-insensitive.

Product Tokens

Product Tokens allow communication applications to identify themselves by the version and name of the software. Product token should be to the point and short.

Syntax

Example


Next TopicWorking of Web





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA