Fetch
Custom headers
Forward your own HTTP headers with a direct fetch.
Use the headers field to forward custom HTTP headers with a request. This is supported for direct (request-based)
fetches.
curl https://request.usestring.ai/v1/fetch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.example.com/protected",
"headers": { "X-API-Key": "abc123", "X-Request-ID": "req-456" }
}'Rules
- Header names must be non-empty, contain only letters, numbers, underscores, and hyphens, and be at most 256 characters.
- Header values may be up to 8192 characters.
- Maximum 50 custom headers per request.
Forbidden headers
These headers are managed by the service and cannot be set:
proxy-authorization, proxy-authenticate, proxy-connection, connection, transfer-encoding, content-length,
te, upgrade, keep-alive, trailer, host.
Not supported with browser fetching
Custom headers are only forwarded on direct fetches. They are not supported when executeJS or requireWSS is
enabled, and sending them together returns a 400.