An HTTP client, taking inspiration from Ruby's faraday and Python's requests
Package documentation: https://docs.ropensci.org/crul/
Some Features:
HttpClient
- Main interface to making HTTP requests. Synchronous requests only.HttpResponse
- HTTP response object, used for all responses across the
different clients.Paginator
- Auto-paginate through requests - supports a subset of all possible
pagination scenarios - will fill out more scenarios soonAsync
- Asynchronous HTTP requests - a simple interface for many URLS -
whose interface is similar to HttpClient
- all URLs are treated the same.AsyncVaried
- Asynchronous HTTP requests - accepts any number of HttpRequest
objects - with a different interface than HttpClient
/Async
due to the nature
of handling requests with different HTTP methods, options, etc.set_auth()
, set_headers()
, and moreHttpClient
method only,
and allow you to trigger functions to run on requests or responses, or both.
See ?hooks
for the details and examplescrul
integrates with webmockr to mock
HTTP requests. Checkout the http testing bookcrul
also integrates with vcr to cache http requests/responses. Checkout the http testing bookCRAN version
install.packages("crul")
Latest binaries from rOpenSci
install.packages("crul", repos = "https://dev.ropensci.org")
Dev version from GitHub
install.packages("pak")
pak::pak("ropensci/crul")
library("crul")
crul
in R doing citation(package = 'crul')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.