Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vercel/rcurl
`curl --resolve` helper script
https://github.com/vercel/rcurl
Last synced: 14 days ago
JSON representation
`curl --resolve` helper script
- Host: GitHub
- URL: https://github.com/vercel/rcurl
- Owner: vercel
- License: apache-2.0
- Created: 2018-04-25T23:49:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-23T18:58:40.000Z (over 3 years ago)
- Last Synced: 2024-12-17T23:23:12.574Z (18 days ago)
- Language: Shell
- Size: 14.6 KB
- Stars: 25
- Watchers: 62
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: license.md
Awesome Lists containing this project
README
# rcurl
`curl --resolve` helper script.
The `-v` flag also includes additional debugging information from `rcurl`:
```
$ rcurl staging-sfo1.vercel.com https://ip.vercel.app -v
* rcurl - Hostname: ip.vercel.app
* rcurl - Port: 443
* rcurl - Target IP: 76.76.21.21
* rcurl - Command: curl --resolve ip.vercel.app:443:76.76.21.21 https://ip.vercel.app -v
* Added ip.vercel.app:443:76.76.21.21 to DNS cache
* Hostname ip.vercel.app was found in DNS cache
* Trying 76.76.21.21...
* TCP_NODELAY set
* Connected to ip.vercel.app (76.76.21.21) port 443 (#0)
```## Install
[Install `import`](https://import.sh/docs/install), then add
this to your shell script or `.bashrc`/`.zshrc` file:```bash
# Load the `import` function
. "$(which import)"# Import the rcurl function
import "vercel/[email protected]" # NOTE: replace with latest version
```## Usage
```
rcurl $target $url [$options...]
```Any `options` get passed directly to `curl`, so you can specify custom headers,
HTTP method, body, etc.## Examples
``` bash
rcurl 127.0.0.1 https://vercel.com
rcurl alias-bru1.vercel.com https://vercel.com -v --header "Authorization: bearer $token"
```