Overview
The HttpRequest block makes HTTP requests and returns the response. It supports all HTTP methods, headers, query parameters, and automatic JSON serialization.Input Parameters
Required
Optional
Output Fields
Examples
Simple GET Request
POST with JSON Body
- Object bodies are automatically JSON-serialized
Content-Type: application/jsonis automatically added
GET with Query Parameters
https://api.example.com/users?page=2&limit=10&sort=name
PUT with String Body
Custom Timeout
Common Patterns
API Authentication
- Bearer Token
- API Key
- Basic Auth
REST Operations
- Create (POST)
- Read (GET)
- Update (PUT)
- Delete (DELETE)
Error Handling
The block returns an error if the request fails:- Network errors (connection refused, DNS failure)
- Timeout errors (request took longer than
timeoutms) - Invalid URL errors
status field in assertions:
Full Example
Tips
Always Parse JSON Responses
Always Parse JSON Responses
HttpRequest returns
body as text. Use JsonParser to parse it:Use Context for Base URLs
Use Context for Base URLs
Store base URLs in context to avoid repetition:
Check Status in Assertions
Check Status in Assertions
Don’t rely on errors for HTTP status codes:
Increase Timeout for Slow Endpoints
Increase Timeout for Slow Endpoints
Default timeout is 30 seconds. Increase if needed:
Next Steps
JsonParser
Parse JSON responses
StreamParser
Parse streaming responses

