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