{
  "_id": "6a646684059529545f5771a3",
  "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-07-25 07:29:16 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/4e6058b09dd45ca3acb45fa34a05fef22451eb4ddf23d0384218fc96b434991b",
  "_filesize": 222248,
  "_sha256": "4e6058b09dd45ca3acb45fa34a05fef22451eb4ddf23d0384218fc96b434991b",
  "_expires": "2026-11-02T07:32:18.000Z",
  "_created": "2026-07-25T07:29:16.000Z",
  "_published": "2026-07-25T07:32:20.510Z",
  "_jobs": [
    {
      "job": 89657056262,
      "time": 132,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "8617141422"
    },
    {
      "job": 89657056248,
      "time": 131,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "8617141093"
    },
    {
      "job": 89657056231,
      "time": 144,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "8617138369"
    },
    {
      "job": 89657056235,
      "time": 134,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "8617136740"
    },
    {
      "job": 89656799303,
      "time": 192,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8617119425"
    },
    {
      "job": 89657056223,
      "time": 111,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8617137894"
    },
    {
      "job": 89657056239,
      "time": 87,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "8617133956"
    },
    {
      "job": 89657056228,
      "time": 81,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "8617132910"
    },
    {
      "job": 89657056268,
      "time": 78,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "8617132396"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018",
  "_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,
    "orcid": "0009-0002-7992-3520"
  },
  "_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-30",
      "n": 3
    },
    {
      "week": "2025-46",
      "n": 3
    },
    {
      "week": "2026-24",
      "n": 1
    },
    {
      "week": "2026-26",
      "n": 1
    }
  ],
  "_tags": [
    {
      "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": 121
  },
  "_downloads": {
    "count": 5645,
    "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.1",
  "_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",
    "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.070554992207995,
  "_indexed": true,
  "_nocasepkg": "httptest2",
  "_universes": [
    "nealrichardson"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:31:30.000Z",
      "distro": "resolute",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/8e87027463a493839985a643bc28d2db8d217b0625b54d9eec31909e7e7bb3ad",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:31:32.000Z",
      "distro": "resolute",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/78a80fa7f11a2d11e21ebf85ff8e7ebd9a0e93ea9251b27d9c0210804d60c930",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:31:17.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/aa4a25bf4b0244cad8e3a19520b451805aacab2a4b83cf487be4419d7db112bc",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:31:06.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/9281fcfa51524d6d1e30ce35d714c84c488bd3752a1e83d233b1e6848f4efa38",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:31:28.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/c5fae5b2d448489d4da741c374a055ec0b0ab74b7a1f0855fd1d97ced5aeb813",
      "status": "success",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:30:35.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/f9a683f9bfdc5ac4d5966dc68422edf29235ef5281d945fe5b2f9bb1924194af",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:30:29.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/1a9fe4b25a35b1f693fde84494643157871aae114d34fe14acf461ba93ef0c7e",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "1.2.2.9000",
      "date": "2026-07-25T07:30:28.000Z",
      "commit": "37efe13ff4c51504570c5e6ac2d93fff71a416a2",
      "fileid": "https://r2.ropensci.org/fad95b118d762ec188788e830aad7ab7930054ba2dcdcf63b4a3b5dced4281be",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/nealrichardson/actions/runs/30149295018"
    }
  ]
}