Man pages for nealrichardson/httptest
A Test Environment for HTTP Requests

as-redactorWrap a redacting expression as a proper function
block_requestsBlock HTTP requests
build_mock_urlConvert a request to a mock file path
capture_requestsRecord API responses as mock files
change_stateHandle a change of server state
expect_headerTest that an HTTP request is made with a header
expect_json_equivalentTest that objects would generate equivalent JSON
expect_verbExpectations for mocked HTTP requests
fake_responseReturn something that looks like a 'response'
find_mock_fileGo through mock paths to find the local mock file location
get_current_redactorFetch the active redacting function
get_current_requesterFetch the active requesting function
gsub_responseFind and replace within a 'response' or 'request'
httptest'httptest': A Test Environment for HTTP Requests
mockPathsSet an alternate directory for mock API fixtures
publicTest that functions are exported
redactRemove sensitive content from HTTP responses
save_responseWrite out a captured response
set_redactorSet a response redactor
set_requesterSet a request preprocessor
skip_if_disconnectedSkip tests that need an internet connection if you don't have...
start_vignetteSet mocking/capturing state for a vignette
stop_mockingTurn off request mocking
use_httptestUse 'httptest' in your tests
use_mock_apiTurn on API mocking
with_fake_httpMake all HTTP requests return a fake response
with_mock_apiServe a mock API from files
with_mock_dirUse or create mock files depending on their existence
without_internetMake all HTTP requests raise an error
with_traceWrapper around 'trace' to untrace when finished
nealrichardson/httptest documentation built on Feb. 5, 2024, 12:35 a.m.