stacks/ts-http
publicClone
Push over the same URL. A password will not work: create a token under access tokens and use it in place of one.
- .config
- .github
- .vscode
- docs
- packages
- .editorconfig 147 B
- .gitattributes 12 B
- .gitignore 171 B
- build.ts 359 B
- bun.lock 38.9 KB
- bunfig.toml 107 B
- CHANGELOG.md 42.2 KB
- CLAUDE.md 26.7 KB
- deps.yaml 32 B
- httx 39 B
- httx.sqlite 4.0 KB
- httx.sqlite-shm 32.0 KB
- httx.sqlite-wal 531.1 KB
- LICENSE.md 1.0 KB
- package.json 3.9 KB
- pantry.lock 3.6 KB
- README.md 4.5 KB
- tsconfig.json 726 B

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
```bash
brew install httx # wip
pkgx install httx # wip
``` -->
[!NOTE] We are trying to release under the
httxpackage 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 --versionConfiguration
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 configThen run:
./httxTo learn more, head over to the documentation.
Testing
bun testChangelog
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 💙
[codecov-href]: https://codecov.io/gh/stacksjs/httx -->