tests/testthat/_snaps/request.md

request gets created correctly

Code
  print(req)
Message
  -- An HTTP request -------------------------------------------------------------
  Trusted: No
  Method: get
  URL: http://127.0.0.1:80/summary?id=2347&user=Thomas+Lin+Pedersen

trust works

Code
  req$trust <- "test"
Condition
  Error:
  ! `value` must be `TRUE` or `FALSE`, not the string "test".

response can be generated

Code
  req$response <- res2
Condition
  Error:
  ! Response can only be assigned once

body can be parsed

Code
  req$parse(xml = parse_xml())
Condition
  Error in `req$parse()`:
  ! Unsupported Media Type

as.Request and is.Request work correctly

Code
  as.Request(non_rook_env)
Condition
  Error in `as.Request()`:
  ! `x` must be a Rook object


Try the reqres package in your browser

Any scripts or data that you put into this service are public.

reqres documentation built on Aug. 21, 2025, 5:43 p.m.