http-header tagged requests and articles

Categorized request examples and articles tagged with [http-header] keyword
How to send HTTP header with Curl request?
To send an HTTP header with a Curl request, you can use the -H command-line option and pass the header name and value in "Key: Value" format. If you do not provide a value for the header, this will remove the standard header that Curl would otherwise send. The number of HTTP headers is unlimited. You can add as many headers to the Curl request as you need. In this Curl header example, we send the X-Custom-Header and Content-Type request headers to the ReqBin echo URL. Click Run to execute the Curl Send Header Request online and see the results.

How do I make a Keep-Alive request?
To make a Keep-Alive request, specify a "Connection: keep-alive" HTTP header in the request. The Keep-Alive connection means the server won't close the connection after fulfilling the request. In HTTP 1.1, all connections are considered persistent unless declared otherwise. The servers inform the clients about persistent connections by including the "Connection: keep-alive" header in the server response. In this Keep-Alive Connection Example, we send Connection and Keep-Alive headers to the ReqBin echo URL. Click Send to execute the Keep-Alive Connection example online and see the results.

How do I close the connection on the server?
The "Connection: close" HTTP header informs the server that the client wants to close the connection after completing the HTTP transaction. The server decides whether to close the connection after the request or not. In this Connection Close header example, we send a GET request to the ReqBin echo URL with the "Connection: close" HTTP header. Click Send to execute the Close Connection example online and see the results.

What is HTTP?
The HTTP protocol is the widely agreed format of transferring data over a network, the basis of any data exchange on the web.