request-header tagged requests and articles

Categorized request examples and articles tagged with [request-header] keyword
Curl Add Header
An example of adding a header to the Curl request. Use the -H command-line option to set the Curl header details. In this Curl Add Header example, the -H "Content-Type: application/json" command-line option indicates the media type of the resource, and the Accept: application/json header tells the server that the client expects JSON.

Curl Custom Headers
An example of posting a custom header with Curl. To add a custom header to curl, you need to pass the -H "header: value" command line parameter to the curl request. The target url is passed as the first parameter.

GET Request With Custom Headers
An example of sending a custom request header to the server. In this example, the name of the custom header is X-Real-IP and the value is

Send Cookies Example
An example of sending HTTP cookies in the request header. Browsers send cookies to the server by adding the Cookie: name=value request header. Multiple cookies can be sent in a single Cookie header, separated by semicolon.

Request Cookies
An example of sending a request with cookies in the header. Cookies are sent to the server in the Cookie: name=value request header. To send multiple cookies in a single Cookie header, separate them by a semicolon, or add multiple Cookie: name=value request headers.

HTTP Headers
The browser and server use HTTP headers to pass the information on data size and type, compression methods, languages, cache directives, and origin.