← Back to Home

Cookies

/cookies
Returns all cookies sent in the request. Useful for testing cookie handling.

Examples

curl
curl https://tcpdata.com/cookies \
  -H "Cookie: session=abc123; user=john"
JavaScript (fetch)
// Cookies are automatically sent by the browser
fetch('https://tcpdata.com/cookies', {
  credentials: 'include'
})
  .then(res => res.json())
  .then(data => console.log(data));
Python (requests)
import requests

cookies = {'session': 'abc123', 'user': 'john'}
response = requests.get('https://tcpdata.com/cookies', cookies=cookies)
print(response.json())