Skip to content

Return the incoming request's HTTP headers.

GET
/headers

Responses

JSON
{
"headers": {
}
}

Samples

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())
Powered by VitePress OpenAPI