webmockr-package {webmockr}R Documentation

webmockr: Stubbing and Setting Expectations on 'HTTP' Requests

Description

Stubbing and setting expectations on 'HTTP' requests. Includes tools for stubbing 'HTTP' requests, including expected request conditions and response conditions. Match on 'HTTP' method, query parameters, request body, headers and more. Can be used for unit tests or outside of a testing context.

Features

Author(s)

Maintainer: Scott Chamberlain myrmecocystus+r@gmail.com (ORCID)

Other contributors:

See Also

Useful links:

Examples

library(webmockr)
stub_request("get", "https://httpbin.org/get")
stub_request("post", "https://httpbin.org/post")
stub_registry()


[Package webmockr version 1.0.0 Index]