Return the incoming request's HTTP headers.
GET
/headersResponses
JSON
{
"headers": {
}
}
GET
/headersSamples
cURL
curl -X GET https://httpbin.rs/headers
JavaScript
fetch("https://httpbin.rs/headers")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("https://httpbin.rs/headers");
Python
import requests
response = requests.get("https://httpbin.rs/headers")
print(response.json())