Skip to content

Return the incoming request's User-Agent header.

GET
/user-agent

Responses

The incoming request's User-Agent header
JSON
{
"user_agent": "string"
}

Samples

cURL
curl -X GET https://httpbin.rs/user-agent
JavaScript
fetch("https://httpbin.rs/user-agent")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("https://httpbin.rs/user-agent");
Python
import requests
response = requests.get("https://httpbin.rs/user-agent")
print(response.json())
Powered by VitePress OpenAPI