Introduction to Rext HTTP
Introduction to Rext HTTP
Section titled “Introduction to Rext HTTP”Rext HTTP is a smart HTTP client built as a VS Code extension. It introduces the .rext file format — an evolution of the traditional .http format — designed for dynamic, automated API workflows.
Why Rext?
Section titled “Why Rext?”Traditional API tools come with significant drawbacks:
- 500MB+ desktop apps eating your RAM
- Collections locked to proprietary formats
- Credentials synced to third-party clouds
- No version control, no Git history
- Context switching between editor and tools
Rext solves all of these by keeping everything in plain text, inside your editor.
What makes Rext different?
Section titled “What makes Rext different?”Unlike traditional .http files, Rext introduces smart directives to handle the complete lifecycle of an HTTP request:
| Feature | Description |
|---|---|
| Variable Capture | Extract values from responses and reuse them |
| Assertions | Validate status codes, bodies, headers, duration |
| Pre-Request Chains | Automatically execute dependencies before a request |
| Shared Configuration | Define base URLs, headers, timeouts once |
| Environment Files | Switch between Dev, Staging, Production with one click |
| Git-Friendly | Plain text .rext files, fully diff-friendly |
Quick Look
Section titled “Quick Look”Here’s a complete example of what a .rext file looks like:
@configbaseUrl: https://api.example.comheaders: Content-Type: application/json
###@id a1b2c3@name LoginPOST /auth/login
{ "email": "{{email}}", "password": "{{password}}"}
@capture env.token = body.access_token@assert status == 200
###@name Get Profile@pre a1b2c3GET /profileAuthorization: Bearer {{token}}
@assert status == 200@assert body.email existsNext Steps
Section titled “Next Steps”- Install Rext HTTP in VS Code
- Learn the basic syntax
- Explore directives