curl head request 1

curl head request

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://hostname/resource

Here is what the above code is Doing:
1. We’re using the requests library to make a GET request to the URL
2. We’re passing a dictionary of headers to the request.
3. We’re printing the response text.

Similar Posts