httx
httx is a simple, fast, lightweight and user-friendly API client. Whether you are working with a CLI, a library or a server, httx is a perfect choice for making HTTP requests.
Features
- π API Requests: easily make API requests in a familiar way
- π€ CLI: a cross-platform CLI
- π Library: use httx as a library in your project
- β‘ Performant: extremely fast and efficient
- πͺΆ Lightweight: built on web standards, lightweight & without dependencies
- πΆ User-Friendly: user-friendly, simple, powerful API
- πͺπ½ Type-Safe: strongly-typed, including type-safe errors
Install
bun install -d @stacksjs/httx
Note
We are trying to release under the httx package name, which is currently abandoned. Please @npmjs, we would love to!ππ½
Get Started
Making requests is simple. There are two ways of getting started: as a library or as a CLI.
Library
Given the npm package is installed:
import type { HttxConfig } from 'httx' // import { ... } from 'httx' // ...
In case you are trying to start multiple proxies, you may use this configuration:
CLI
httx get api.example.com/users httx post api.example.com/users name=john email=john@example.com -j httx get api.example.com/files file@./data.txt -m httx get api.example.com/secure -a username:password httx --help httx --version
Configuration
The Reverse Proxy can be configured using a httx.config.ts (or httx.config.js) file and it will be automatically loaded when running the reverse-proxy command.
// httx.config.{ts,js} import type { HttxOptions } from '@stacksjs/httx' import os from 'node:os' import path from 'node:path' const config: HttxOptions = { verbose: false, } export default config
Then run:
To learn more, head over to the documentation.
Testing
Changelog
Please see our releases page for more information on what has changed recently.
Contributing
Please review the Contributing Guide for details.
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
For casual chit-chat with others using this package:
Join the Stacks Discord Server
Postcardware
βSoftware that is free, but hopes for a postcard.β We love receiving postcards from around the world showing where httx is being used! We showcase them on our website too.
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States π
Sponsors
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
Credits
License
The MIT License (MIT). Please see LICENSE for more information.
Made with π

