tests/testthat/httpbin.not/cookies/set-5b2631.R

structure(list(
  method = "GET", url = "http://httpbin.not/cookies",
  status_code = 200L, headers = structure(
    list(
      Date = "Sun, 05 Dec 2021 20:01:43 GMT",
      `Content-Type` = "application/json", `Content-Length` = "44",
      Connection = "keep-alive", Server = "gunicorn/19.9.0",
      `Access-Control-Allow-Origin` = "*", `Access-Control-Allow-Credentials` = "true",
      # Set-Cookie is artificially added here because it is lost in a 302 redirect
      `Set-Cookie` = "token=12345; Domain=example.com; Max-Age=31536000; Path=/"
    ),
    class = "httr2_headers"
  ),
  body = charToRaw("{\n  \"cookies\": {\n    \"token\": \"12345\"\n  }\n}\n")
), class = "httr2_response")

Try the httptest2 package in your browser

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

httptest2 documentation built on May 29, 2024, 8:42 a.m.