crul
R6 based http client for R (for developers). Contribute to ropensci/crul development by creating an account on GitHub.
crul took mocking back from webmockr and made it a property of the client itself
◆Recent moves
- 1y ago
Mocking becomes a client parameter, independent of webmockr
⚡ SPARKMoves mocking control into HttpClient, Async and AsyncVaried as an initialisation parameter or per-method argument, and deprecates the standalone mock() function. crul no longer needs webmockr to be in charge of whether requests are intercepted — the client decides. Published within a minute of webmockr's release cutting its own dependency on vcr.
View source ↗ - 2y ago
Async requests become mockable through webmockr
Adds the ability to mock async requests through webmockr for both Async and AsyncVaried, closing the gap where the async paths could not be tested the way synchronous ones could. One release later this integration is what 1.6.0 replaces with client-owned mocking.
View source ↗ - 2y ago
Documentation fixes and test helper tweak
Typo fixes, a move to the _PACKAGE documentation pattern, and a test-helper tweak. Documentation and internals only.
View source ↗ - 3y ago
HTTP retries reach the async classes
Brings HTTP retries to the async classes — Async, AsyncVaried and AsyncQueue — and to the HttpRequest builder. Retry logic existed for synchronous requests; this closes the gap for the concurrent paths where transient failures are most likely to appear.
View source ↗ - 3y ago
Clearer error for mismatched urls and disk lengths
Improves the error message when the urls and disk vectors passed to Async have different lengths. A clearer message for a constraint that already existed.
View source ↗ - 4y ago
AsyncQueue gains response accessors; results print as a summary
Fills out AsyncQueue with parse, status_code, status, content and times methods so it matches the other async classes, and gives $responses() an S3 class with a print method that summarises rather than dumping every result to the console. Header parsing also gains an encoding check with a Latin-1 fallback before failing.
View source ↗