webmockr
R library for stubbing and setting expectations on HTTP requests.
Port of the Ruby gem webmock
Features
- Stubbing HTTP requests at low http client lib level
- Setting and verifying expectations on HTTP requests
- Matching requests based on method, URI, headers and body
- Can be used for testing or outside of a testing context
- Supports async http request mocking with
crul only
Supported HTTP libraries
Install
from cran
install.packages("webmockr")
Dev version
install.packages("webmockr", repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))
Contributors
Meta
- Please report any issues or bugs.
- License: MIT
- Get citation information for
webmockr in R doing citation(package = 'webmockr')
- Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.