Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

crul

Project Status: Active - The project has reached a stable, usable state and is being actively developed. R-check codecov cran checks rstudio mirror downloads cran version

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 soon
  • Async - 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 curl options globally: set_auth(), set_headers(), and more
  • Writing to disk and streaming: available with both synchronous requests as well as async requests
  • Hooks on requests and responses are available in the HttpClient method only, and allow you to trigger functions to run on requests or responses, or both. See ?hooks for the details and examples
  • Mocking: crul integrates with webmockr to mock HTTP requests. Checkout the http testing book
  • Test caching: crul also integrates with vcr to cache http requests/responses. Checkout the http testing book

Installation

CRAN version

install.packages("crul")

Dev version

remotes::install_github("ropensci/crul")
library("crul")

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for crul in R doing citation(package = 'crul') 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.

ropensci_footer

You can’t perform that action at this time.