← Back to Home

Headers

/headers
Returns all HTTP headers sent in the request. Useful for debugging and inspecting what headers your client is sending.

Examples

curl
curl https://tcpdata.com/headers \
  -H "X-Custom-Header: test" \
  -H "Authorization: Bearer token123"
JavaScript (fetch)
fetch('https://tcpdata.com/headers', {
  headers: {
    'X-Custom-Header': 'test',
    'Authorization': 'Bearer token123'
  }
})
  .then(res => res.json())
  .then(data => console.log(data));
Python (requests)
import requests

response = requests.get('https://tcpdata.com/headers',
    headers={'X-Custom-Header': 'test', 'Authorization': 'Bearer token123'})
print(response.json())