Requests · Example Payload

Requests Get Example

ClientsHTTP ClientHTTP LibraryOpen SourcePythonPython Software Foundation

Requests Get Example is an example object payload from Requests, with 3 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

_commentrequestresponse

Example Payload

requests-get-example.json Raw ↑
{
  "_comment": "Python Requests: r = requests.get('https://api.github.com/users/octocat', headers={'Accept': 'application/vnd.github+json'}, timeout=10)",
  "request": {
    "@context": "https://raw.githubusercontent.com/api-evangelist/requests/refs/heads/main/json-ld/requests-context.jsonld",
    "@type": "HTTPRequest",
    "method": "GET",
    "url": "https://api.github.com/users/octocat",
    "headers": {
      "Accept": "application/vnd.github+json"
    },
    "timeout": 10,
    "verify": true,
    "allow_redirects": true
  },
  "response": {
    "@context": "https://raw.githubusercontent.com/api-evangelist/requests/refs/heads/main/json-ld/requests-context.jsonld",
    "@type": "HTTPResponse",
    "status_code": 200,
    "ok": true,
    "reason": "OK",
    "url": "https://api.github.com/users/octocat",
    "headers": {
      "Content-Type": "application/json; charset=utf-8",
      "X-RateLimit-Remaining": "59"
    },
    "encoding": "utf-8",
    "elapsed": 0.342,
    "json_body": {
      "login": "octocat",
      "id": 583231,
      "name": "The Octocat",
      "company": "GitHub",
      "public_repos": 8
    }
  }
}