Skip to content

vadimpiven/node_reqwest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GitHub repo npm version API docs Ask DeepWiki CI status Test coverage

Open in GitHub Codespaces

node-reqwest

Node.js bindings for reqwest — a Rust HTTP client library. Provides system proxy, trusted system CA certificates, and HTTP/2 out of the box, with no additional configuration. Compatible with Electron.

Packages

Package Description
node-reqwest Published npm package with prebuilt native addon
core Rust HTTP client (reqwest wrapper)
meta Build-time metadata and version tooling

Quick start

The only prerequisite is mise. It manages Node.js, Rust, Python, pnpm, and all other tooling automatically.

git clone https://github.com/vadimpiven/node_reqwest.git
cd node_reqwest
mise trust
mise install
mise run test

Rerun tests without cache: mise run -f t

Build requirements

Required

  • mise for tool version management
  • C++ development toolchain (required by Rust)

Optional

Environment setup

# GitHub token avoids rate limits during mise tool installation
# https://github.com/settings/personal-access-tokens/new
[ -f .env ] || cp .env.example .env
# Edit .env and set GITHUB_TOKEN

Docker build and test

To verify glibc compatibility or test in a clean environment, use VS Code Dev Containers extension to open the project directly in the container.

For manual Docker usage:

[ -f .env ] || cp .env.example .env
grep -q "^USER_UID=" .env || echo "USER_UID=$(id -u)" >> .env
grep -q "^USER_GID=" .env || echo "USER_GID=$(id -g)" >> .env

mise run docker   # build, run and attach
mise install      # inside the container
mise run test     # inside the container
exit              # stop the container

Mitmproxy

The Docker environment includes mitmproxy for inspecting HTTP/HTTPS traffic. The docker-compose.proxied.yaml is merged automatically by mise run docker.

MITMPROXY_WEB_PASSWORD=example_password
echo "MITMPROXY_WEB_PASSWORD=${MITMPROXY_WEB_PASSWORD}" >> .env
mise run docker
open "http://127.0.0.1:8081/?token=${MITMPROXY_WEB_PASSWORD}"

Troubleshooting

Reset the environment and free up disk space:

mise run clean

License

Apache-2.0 OR MIT

About

Node.js bindings for reqwest - Rust HTTP client library

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors