A Zed editor extension that enables sending HTTP requests to APIs directly from the editor. Test and debug APIs without leaving your development environment.
- 🚀 Send HTTP requests directly from
.httpfiles in Zed - 🎨 Syntax highlighting for HTTP request files (provided by the HTTP plugin)
- 📝 Support for all HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.)
- 🔧 Headers and request bodies with JSON, XML, and other formats
- 📊 Response viewer with formatted output
- 💻 Cross-platform - Automatic binary downloads for macOS, Linux, and Windows
- ⚡ Fast and lightweight - Built with Rust and WebAssembly
- Open Zed editor
- Press
cmd+shift+p(macOS) orctrl+shift+p(Linux/Windows) - Type "extensions" and select "zed: extensions"
- Search for "Http Client"
- Click "Install"
Clone this repository and build from source:
git clone https://github.com/cramhead/http-client.git
cd http-client
cargo build --target wasm32-wasip1 --release
cp target/wasm32-wasip1/release/http_client.wasm extension.wasmCreate a file with the .http extension and write your requests:
# Simple GET request
GET https://api.github.com/users/octocat
Accept: application/json
###
# POST request with JSON body
POST https://httpbin.org/post
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com"
}
###
# Request with headers
GET https://api.example.com/data
Authorization: Bearer your-token-here
Accept: application/json- Request Line:
METHOD URL - Headers:
Header-Name: value(one per line) - Body: Leave a blank line after headers, then add your request body
- Separator: Use
###to separate multiple requests in one file
- Open a
.httpfile - Use code actions (code lenses) to execute requests
- View results in the
http-responses.httpfile
The extension consists of two main components:
- Location:
src/lib.rs - Purpose: Integrates with Zed's extension system
- Responsibilities:
- Registers
.httpfile support - Manages LSP server lifecycle
- Handles platform detection and binary distribution
- Downloads and caches the appropriate LSP server binary
- Registers
- Location:
lsp/ - Purpose: Language Server Protocol implementation
- Responsibilities:
- Parses
.httpfiles - Executes HTTP requests
- Formats responses
- Provides code lenses for request execution
- Parses
The extension automatically downloads the correct LSP server binary for your platform:
- Platform Detection: Detects your OS and architecture
- Cache Check: Looks for cached binary
- Download: If not cached, downloads from GitHub Releases
- Execution: Makes binary executable and starts the LSP server
Supported platforms:
- macOS (Intel x86_64 and Apple Silicon aarch64)
- Linux (x86_64 and aarch64)
- Windows (x86_64)
- Rust toolchain (install from rustup.rs)
wasm32-wasip1target:rustup target add wasm32-wasip1- Zed editor
http-client/
├── src/ # Extension code (WebAssembly)
│ └── lib.rs # Main extension entry point
├── lsp/ # LSP server (native binary)
│ ├── src/
│ │ ├── main.rs # LSP server entry point
│ │ ├── parser.rs # HTTP request parser
│ │ ├── executor.rs # Request executor
│ │ └── lsp_server.rs # LSP implementation
│ └── Cargo.toml
├── languages/http/ # Language configuration
│ ├── config.toml # Language settings
│ └── highlights.scm # Syntax highlighting
├── .github/workflows/ # CI/CD
│ └── release.yml # Release automation
├── extension.toml # Extension metadata
└── CLAUDE.md # Development guidelines
Build the extension:
cargo build --target wasm32-wasip1 --release
cp target/wasm32-wasip1/release/http_client.wasm extension.wasmBuild the LSP server:
cd lsp
cargo build --releaseFor development, create a bin/ directory in your workspace and copy the LSP binary there. The extension will use this instead of downloading:
mkdir -p bin
cp lsp/target/release/http-lsp bin/Run the test suite:
# Run all tests (51 tests across both crates)
cargo test --workspace
# Run extension tests only
cargo test -p http-client
# Run LSP tests only
cargo test -p http-lspTests use rstest for parametrized testing and cover:
- HTTP request parsing (all methods, headers, bodies)
- Response formatting and display
- Edge cases (comments, empty files, multiple requests)
Contributions are welcome! We appreciate your help in making this extension better.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run tests:
cargo test --workspace - Commit your changes:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Open a Pull Request
- Write clear, concise commit messages
- Add tests for new features
- Update documentation as needed
- Follow Rust best practices and idioms
- Run
cargo fmtandcargo clippybefore committing
We're particularly interested in contributions for:
- 🌐 Additional HTTP features (OAuth, certificates, proxies)
- 📝 Improved syntax highlighting
- 🎨 Better response formatting
- 🐛 Bug fixes and performance improvements
- 📚 Documentation improvements
- 🧪 Additional tests and test coverage
We are committed to providing a welcoming and inclusive experience for everyone. We pledge to make participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
- Be respectful: Treat everyone with respect and kindness
- Be constructive: Provide helpful feedback and suggestions
- Be collaborative: Work together to solve problems
- Be patient: Remember that everyone has different skill levels
- Be open-minded: Consider different perspectives and approaches
- Harassment, discrimination, or offensive comments
- Personal attacks or insults
- Trolling or inflammatory comments
- Publishing private information without consent
- Any conduct that would be inappropriate in a professional setting
If you experience or witness unacceptable behavior, please report it by opening an issue or contacting the maintainers directly. All reports will be handled with discretion and confidentiality.
Violations of the Code of Conduct may result in:
- A warning
- Temporary ban from the project
- Permanent ban from the project
We reserve the right to remove comments, commits, code, issues, and other contributions that violate this Code of Conduct.
We value your feedback! Here's how you can share it:
- 🐛 Bug Reports: Open an issue with details about the problem
- 💡 Feature Requests: Start a discussion about your idea
- ❓ Questions: Use GitHub Discussions for questions
- ⭐ Show Support: Star the repository if you find it useful!
Future plans for the extension:
- Environment variables and variable substitution
- Request history and favorites
- GraphQL support
- WebSocket support
- Import/export collections (Postman, Insomnia)
- Authentication flows (OAuth, JWT)
- Request chaining and scripting
- Performance improvements
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.
- ✅ You can use, modify, and distribute this software
- ✅ You can use it for commercial purposes
⚠️ If you modify and distribute it, you must share your changes under the same license⚠️ If you use it in a network service, you must make the source code available
- Built with zed_extension_api
- Tree-sitter grammar from rest-nvim/tree-sitter-http
- Inspired by REST Client and HTTP Client tools
Marc d'Entremont (@cramhead)
Note: This extension is in active development. If you encounter any issues or have suggestions, please don't hesitate to reach out!