On this page:
oc-response

5 Responses🔗ℹ

struct

(struct oc-response (data
    status-code
    rate-limit-remaining
    rate-limit-reset
    raw))
  data : hash?
  status-code : exact-nonnegative-integer?
  rate-limit-remaining : (or/c exact-nonnegative-integer? #f)
  rate-limit-reset : (or/c exact-nonnegative-integer? #f)
  raw : hash?
The data field is the parsed JSON (converted to Racket hashes with symbol keys). Rate limit fields come from X-RateLimit-Remaining and X-RateLimit-Reset headers. The raw field holds auxiliary data including the original headers and body.

Accessor procedures:
  • oc-response-data

  • oc-response-status-code

  • oc-response-rate-limit-remaining

  • oc-response-rate-limit-reset