Crul
R6 based http client for R (for developers)
Install / Use
/learn @ropensci/CrulREADME
crul <img src="man/figures/logo.png" align="right" alt="" width="120">
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 toHttpClient- all URLs are treated the same.AsyncVaried- Asynchronous HTTP requests - accepts any number ofHttpRequestobjects - with a different interface thanHttpClient/Asyncdue 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
HttpClientmethod only, and allow you to trigger functions to run on requests or responses, or both. See?hooksfor the details and examples - Mocking:
crulintegrates with webmockr to mock HTTP requests. Checkout the http testing book - Test caching:
crulalso integrates with vcr to cache http requests/responses. Checkout the http testing book
Installation
CRAN 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")
Meta
- Please report any issues or bugs.
- License: MIT
- Get citation information for
crulin R doingcitation(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.
- Where does the package name come from? It was a play on "curl", the popular command line client.
- Where does the sticker design come from? The sticker idea arose from a tweet - crul is close (ish) to Krull, a 1980's movie with a "mystical five-pointed weapon". The association with Krull was not known before naming the package.
Related Skills
gh-issues
339.5kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
oracle
339.5kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
tmux
339.5kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
