connection-close tagged requests and articles

Categorized request examples and articles tagged with [connection-close] keyword
How to force Curl to close the connection after response?
Curl tries to keep connections open and reuse existing connections. To close a connection after a request, you can send a "Connection: close" HTTP header to the server. The Connection: close header informs the server that the client wants to close the connection after completing the HTTP transaction. It's up to the server to close the connection after the request or not. You can use the- H command-line option to pass the "Connection: close" header to Curl. In this Curl Close Connection example, we send a request to the ReqBin echo URL with the corresponding header. Click Run to execute the Сurl Сommand with Сlose Сonnection Header example online and see the result.

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.