crul (version 0.8.0)

crul-package: HTTP R client

Description

HTTP R client

Arguments

Package API

HTTP verbs (or HTTP request methods)

See verb-GET, verb-POST, verb-PUT, verb-PATCH, verb-DELETE, verb-HEAD for details.

  • HttpClient is the main interface for making HTTP requests, and includes methods for each HTTP verb

  • HttpRequest allows you to prepare a HTTP payload for use with AsyncVaried, which provides asynchronous requests for varied HTTP methods

  • Async provides asynchronous requests for a single HTTP method at a time

  • the verb() method can be used on all the above to request a specific HTTP verb

HTTP conditions

We use fauxpas if you have it installed for handling HTTP conditions but if it's not installed we use httpcode

Mocking

Mocking HTTP requests is supported via the webmockr package. See mock for guidance, and https://ropenscilabs.github.io/http-testing-book/

Caching

Caching HTTP requests is supported via the vcr package. See https://ropenscilabs.github.io/http-testing-book/

Links

Source code: https://github.com/ropensci/crul

Bug reports/feature requests: https://github.com/ropensci/crul/issues