{
  "_id": "6a4958def6c47c441949d8cd",
  "Package": "httptest2",
  "Type": "Package",
  "Title": "Test Helpers for 'httr2'",
  "Description": "Testing and documenting code that communicates with remote\nservers can be painful. This package helps with writing tests\nfor packages that use 'httr2'. It enables testing all of the\nlogic on the R sides of the API without requiring access to the\nremote service, and it also allows recording real API responses\nto use as test fixtures. The ability to save responses and load\nthem offline also enables writing vignettes and other dynamic\ndocuments that can be distributed without access to a live\nserver.",
  "Version": "1.2.2.9000",
  "Authors@R": "c(\nperson(\"Neal\", \"Richardson\", role=c(\"aut\", \"cre\"), email=\"neal.p.richardson@gmail.com\", comment=c(ORCID=\"0009-0002-7992-3520\")),\nperson(\"Jonathan\", \"Keane\", role=\"ctb\", email=\"jkeane@gmail.com\"),\nperson(\"Maëlle\", \"Salmon\", role=\"ctb\", email=\"maelle.salmon@yahoo.se\", comment=c(ORCID=\"0000-0002-2815-0399\"))\n)",
  "URL": "https://enpiar.com/httptest2/,\nhttps://github.com/nealrichardson/httptest2",
  "BugReports": "https://github.com/nealrichardson/httptest2/issues",
  "License": "MIT + file LICENSE",
  "Language": "en-US",
  "RoxygenNote": "7.3.3",
  "Roxygen": "list(markdown = TRUE)",
  "Encoding": "UTF-8",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/pak/sysreqs": "cmake make libuv1-dev libssl-dev",
  "Repository": "https://nealrichardson.r-universe.dev",
  "Date/Publication": "2026-06-25 17:56:55 UTC",
  "RemoteUrl": "https://github.com/nealrichardson/httptest2",
  "RemoteRef": "HEAD",
  "RemoteSha": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-25 20:19:32 UTC",
    "User": "root"
  },
  "Author": "Neal Richardson [aut, cre] (ORCID:\n<https://orcid.org/0009-0002-7992-3520>),\nJonathan Keane [ctb],\nMaëlle Salmon [ctb] (ORCID: <https://orcid.org/0000-0002-2815-0399>)",
  "Maintainer": "Neal Richardson <neal.p.richardson@gmail.com>",
  "_user": "nealrichardson",
  "_type": "src",
  "_file": "httptest2_1.2.2.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/1d427988110092c46540b2f61f9c880c9c10048134a0836658b46a50925ead99",
  "_filesize": 222379,
  "_sha256": "1d427988110092c46540b2f61f9c880c9c10048134a0836658b46a50925ead99",
  "_expires": "2026-10-12T19:02:52.000Z",
  "_created": "2026-06-25T20:19:32.000Z",
  "_published": "2026-07-04T19:02:54.440Z",
  "_jobs": [
    {
      "job": 85158805657,
      "time": 138,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7889908553"
    },
    {
      "job": 85158805658,
      "time": 129,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7889905133"
    },
    {
      "job": 85158805626,
      "time": 91,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7889891818"
    },
    {
      "job": 85158805607,
      "time": 121,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7889901927"
    },
    {
      "job": 85158805474,
      "time": 209,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7889857571"
    },
    {
      "job": 85158805642,
      "time": 141,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7889909475"
    },
    {
      "job": 85158805625,
      "time": 95,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7889892793"
    },
    {
      "job": 85158805494,
      "time": 86,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7889889608"
    },
    {
      "job": 85158805486,
      "time": 81,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7889888091"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013",
  "_status": "success",
  "_upstream": "https://github.com/nealrichardson/httptest2",
  "_commit": {
    "id": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
    "author": "Jon Harmon <jonthegeek@gmail.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Bump httr2 version (#68)",
    "time": 1782410215
  },
  "_maintainer": {
    "name": "Neal Richardson",
    "email": "neal.p.richardson@gmail.com",
    "login": "nealrichardson",
    "twitter": "@enpiar",
    "description": "",
    "uuid": 2975928
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "digest",
      "role": "Imports"
    },
    {
      "package": "httr2",
      "version": ">= 1.0.0",
      "role": "Imports"
    },
    {
      "package": "jsonlite",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.1.5",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "curl",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "pkgload",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    },
    {
      "package": "webfakes",
      "role": "Suggests"
    },
    {
      "package": "xml2",
      "role": "Suggests"
    }
  ],
  "_owner": "nealrichardson",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2025-26",
      "n": 2
    },
    {
      "week": "2025-28",
      "n": 1
    },
    {
      "week": "2025-30",
      "n": 3
    },
    {
      "week": "2025-46",
      "n": 3
    },
    {
      "week": "2026-24",
      "n": 1
    },
    {
      "week": "2026-26",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "1.2.0",
      "date": "2025-06-27"
    },
    {
      "name": "1.2.1",
      "date": "2025-07-27"
    },
    {
      "name": "1.2.2",
      "date": "2025-11-16"
    }
  ],
  "_topics": [
    "http",
    "mock",
    "testing"
  ],
  "_stars": 36,
  "_contributors": [
    {
      "user": "nealrichardson",
      "count": 280,
      "uuid": 2975928
    },
    {
      "user": "byapparov",
      "count": 7,
      "uuid": 1449277
    },
    {
      "user": "maelle",
      "count": 5,
      "uuid": 8360597
    },
    {
      "user": "jonkeane",
      "count": 4,
      "uuid": 700357
    },
    {
      "user": "hadley",
      "count": 3,
      "uuid": 4196
    },
    {
      "user": "jmaspons",
      "count": 2,
      "uuid": 102644
    },
    {
      "user": "jonthegeek",
      "count": 2,
      "uuid": 33983824
    },
    {
      "user": "dmenne",
      "count": 1,
      "uuid": 506275
    },
    {
      "user": "kforner",
      "count": 1,
      "uuid": 122744
    },
    {
      "user": "lionel-",
      "count": 1,
      "uuid": 4465050
    },
    {
      "user": "brooklynbagel",
      "count": 1,
      "uuid": 7762865
    },
    {
      "user": "natbprice",
      "count": 1,
      "uuid": 4807431
    },
    {
      "user": "exetico",
      "count": 1,
      "uuid": 3549445
    }
  ],
  "_userbio": {
    "uuid": 2975928,
    "type": "user",
    "name": "Neal Richardson",
    "followers": 120
  },
  "_downloads": {
    "count": 8830,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/httptest2"
  },
  "_devurl": "https://github.com/nealrichardson/httptest2",
  "_pkgdown": "https://enpiar.com/httptest2/",
  "_searchresults": 201,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/httptest2.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/nealrichardson/httptest2",
  "_realowner": "nealrichardson",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2022-01-10"
    },
    {
      "version": "1.0.0",
      "date": "2023-11-07"
    },
    {
      "version": "1.1.0",
      "date": "2024-04-26"
    },
    {
      "version": "1.2.0",
      "date": "2025-06-27"
    },
    {
      "version": "1.2.1",
      "date": "2025-08-01"
    },
    {
      "version": "1.2.2",
      "date": "2025-11-16"
    }
  ],
  "_exports": [
    ".mockPaths",
    "block_requests",
    "build_mock_url",
    "capture_requests",
    "change_state",
    "end_vignette",
    "expect_DELETE",
    "expect_GET",
    "expect_no_request",
    "expect_PATCH",
    "expect_POST",
    "expect_PUT",
    "expect_request_header",
    "find_mock_file",
    "get_current_redactor",
    "gsub_response",
    "redact_cookies",
    "redact_headers",
    "save_response",
    "set_redactor",
    "start_capturing",
    "start_vignette",
    "stop_capturing",
    "stop_mocking",
    "use_httptest2",
    "use_mock_api",
    "with_mock_api",
    "with_mock_dir",
    "with_trace",
    "within_body_text",
    "without_internet"
  ],
  "_help": [
    {
      "page": "mockPaths",
      "title": "Set an alternate directory for mock API fixtures",
      "topics": [
        ".mockPaths"
      ]
    },
    {
      "page": "capture_requests",
      "title": "Record API responses as mock files",
      "topics": [
        "capture_requests",
        "start_capturing",
        "stop_capturing"
      ]
    },
    {
      "page": "change_state",
      "title": "Handle a change of server state",
      "topics": [
        "change_state"
      ]
    },
    {
      "page": "expect_request_header",
      "title": "Test that an HTTP request is made with a header",
      "topics": [
        "expect_request_header"
      ]
    },
    {
      "page": "expect_verb",
      "title": "Expectations for mocked HTTP requests",
      "topics": [
        "expect_DELETE",
        "expect_GET",
        "expect_no_request",
        "expect_PATCH",
        "expect_POST",
        "expect_PUT",
        "expect_verb"
      ]
    },
    {
      "page": "gsub_response",
      "title": "Find and replace within a response object",
      "topics": [
        "gsub_response"
      ]
    },
    {
      "page": "redact",
      "title": "Remove sensitive content from HTTP responses",
      "topics": [
        "redact",
        "redact_cookies",
        "redact_headers",
        "within_body_text"
      ]
    },
    {
      "page": "set_redactor",
      "title": "Set a response redactor",
      "topics": [
        "set_redactor"
      ]
    },
    {
      "page": "start_vignette",
      "title": "Set mocking/capturing state for a vignette",
      "topics": [
        "end_vignette",
        "start_vignette"
      ]
    },
    {
      "page": "use_httptest2",
      "title": "Use 'httptest2' in your tests",
      "topics": [
        "use_httptest2"
      ]
    },
    {
      "page": "with_mock_api",
      "title": "Serve a mock API from files",
      "topics": [
        "stop_mocking",
        "use_mock_api",
        "with_mock_api"
      ]
    },
    {
      "page": "with_mock_dir",
      "title": "Use or create mock files depending on their existence",
      "topics": [
        "with_mock_dir"
      ]
    },
    {
      "page": "without_internet",
      "title": "Make all HTTP requests raise an error",
      "topics": [
        "block_requests",
        "without_internet"
      ]
    }
  ],
  "_readme": "https://github.com/nealrichardson/httptest2/raw/HEAD/README.md",
  "_rundeps": [
    "askpass",
    "brio",
    "callr",
    "cli",
    "crayon",
    "curl",
    "desc",
    "diffobj",
    "digest",
    "evaluate",
    "fs",
    "glue",
    "httr2",
    "jsonlite",
    "lifecycle",
    "magrittr",
    "openssl",
    "otel",
    "pkgbuild",
    "pkgload",
    "praise",
    "processx",
    "ps",
    "R6",
    "rappdirs",
    "rlang",
    "rprojroot",
    "sys",
    "testthat",
    "vctrs",
    "waldo",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "faq.Rmd",
      "filename": "faq.html",
      "title": "Frequently Asked Questions",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Where are my mocks recorded?",
        "How do I fix \"non-portable file paths\"?",
        "Why are mocks stored as text files?"
      ],
      "created": "2020-12-15 00:06:40",
      "modified": "2023-07-06 17:01:09",
      "commits": 5
    },
    {
      "source": "httptest2.Rmd",
      "filename": "httptest2.html",
      "title": "httptest: A Test Environment for HTTP Requests in R",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Getting started",
        "Basic tests from a live server",
        "Going deeper"
      ],
      "created": "2021-12-29 13:44:20",
      "modified": "2025-06-27 19:09:37",
      "commits": 5
    },
    {
      "source": "redacting.Rmd",
      "filename": "redacting.html",
      "title": "Redacting and Modifying Recorded Requests",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Default: redact standard auth methods",
        "Writing custom redacting functions",
        "Setting a package-level redactor",
        "URL shortening"
      ],
      "created": "2017-10-08 21:42:19",
      "modified": "2025-06-27 19:09:37",
      "commits": 20
    },
    {
      "source": "vignettes.Rmd",
      "filename": "vignettes.html",
      "title": "Writing Vignettes with APIs",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The basics: start_vignette()",
        "Handling server state changes",
        "Advanced topics"
      ],
      "created": "2018-01-12 06:00:09",
      "modified": "2025-06-27 19:09:37",
      "commits": 10
    }
  ],
  "_score": 10.440943008580259,
  "_indexed": true,
  "_nocasepkg": "httptest2",
  "_universes": [
    "nealrichardson"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:21:46.000Z",
      "distro": "resolute",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/0435014811bd3e24b28a6a20c005d98e0671694cae7d87b9198a95e14e1ecf86",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:21:37.000Z",
      "distro": "resolute",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/06fd664946252dbb5de911035f25880222e5bdb4dc1c68d92a05cad0324529ee",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:21:06.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/f9c5bed0e727fc5c43b93fc81c050207d985aefae16c421629ea0026a23ec29e",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:21:24.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/3367ed1e7c283821f4b3e738c5c9864a65fa44d094075acb007c556b9d61fa7e",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:22:09.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/fecffc02208eb93c490f9e732aea03a0ef64d33410f11add1f24afe645285901",
      "status": "success",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:20:54.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/a8aa89bdab77e6c3d62add78a275fc335d735ce2c6e4b124f04b1f84e8abe646",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:20:42.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/44742b6acb4fd190fec835ebb72334bafe51c80de675e71b2f336c39ad527e5a",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.2.2.9000",
      "date": "2026-06-25T20:20:41.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/be92ebddf1f14eeb6859492dd3112f69c62d8b1df644023d62f48484a279ad7b",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/28197789013"
    }
  ]
}