Skip to content
🦖

@t-req/core

The HTTP request library for .http files. Parse, interpolate, and execute HTTP requests programmatically.
### Get user information
# @name getUser
GET {{baseUrl}}/users/{{userId}}
Authorization: Bearer {{authToken}}
Accept: application/json
import { createClient } from '@t-req/core';
const client = createClient({
variables: {
baseUrl: 'https://api.example.com',
userId: '123',
authToken: process.env.API_TOKEN,
},
});
const response = await client.run('./api.http');
console.log(response);
  • Familiar Format: Use the same .http files you already have from VS Code or JetBrains
  • Portable: Run your HTTP files in any JavaScript runtime
  • Testable: Write integration tests using your existing request definitions
  • Scriptable: Automate API workflows with full programmatic control