Skip to main content
HTTP Client provides direct access to HTTP/HTTPS endpoints. Make requests to APIs, retrieve data, and interact with web services.

Key Features

  • All HTTP Methods - GET, POST, PUT, PATCH, DELETE
  • Authentication - Bearer tokens, OAuth 2.0, Basic auth, custom headers
  • Headers Control - Set custom headers, manage cookies
  • Body Support - JSON, form data, raw text
  • Error Handling - Response status codes, error messages
  • Timeout - 30-second timeout with retry capability

How to Enable

For Agents

  1. Agents > Select Agent > Settings > Capabilities
  2. Attach HTTP Client

For MCP Gateways

  1. Gateways > Select Gateway > Capabilities
  2. Attach HTTP Client

Usage Examples

Simple GET Request

GET https://api.example.com/users/123
Response:
{
  "id": 123,
  "name": "Alice",
  "email": "alice@example.com"
}

POST with JSON Body

POST https://api.example.com/users
Content-Type: application/json

{
  "name": "Bob",
  "email": "bob@example.com"
}

Bearer Token Authentication

GET https://api.example.com/profile
Authorization: Bearer sk-abc123def456...

Custom Headers

GET https://api.example.com/data
Authorization: Bearer {token}
X-Custom-Header: value
Accept: application/json

Authentication Methods

No Authentication

GET https://api.example.com/public-data

Bearer Token

Authorization: Bearer token-here

Basic Authentication

Authorization: Basic base64(user:pass)

Custom Headers

X-API-Key: your-api-key
X-Auth-Token: your-token

OAuth 2.0

Handled via Connector authentication. For raw OAuth, include Authorization header with token.

Request Methods

Retrieve data
GET /api/users

Response Handling

All responses return:
{
  "status_code": 200,
  "headers": {
    "content-type": "application/json",
    "x-rate-limit": "100"
  },
  "body": {
    "data": "..."
  },
  "error": null
}

Status Codes

CodeMeaningRetry
2xxSuccessN/A
3xxRedirectAutomatic
4xxClient errorNo
5xxServer errorYes (retry)

Resource Limits

LimitValueNotes
Request Body2MBMaximum size
Response Body2MBMaximum size
Timeout30s defaultMin 1s, max 300s configurable
Rate Limit1,000/minPer user
Max Redirects10Per request chain

Configuration

Optional gateway specifications:
{
  "http_client": {
    "timeout_seconds": 30,
    "follow_redirects": true,
    "verify_ssl": true,
    "max_body_size": 25000000
  }
}

Common Use Cases

Fetch Data from API

GET https://api.example.com/data?limit=10
Authorization: Bearer {token}

Submit Form

POST https://forms.example.com/submit
Content-Type: application/json

{
  "name": "John",
  "email": "john@example.com"
}

Update Remote Resource

PATCH https://api.example.com/items/5
Authorization: Bearer {token}
Content-Type: application/json

{
  "status": "completed"
}

Webhook Integration

POST https://your-webhook.example.com/events
Content-Type: application/json

{
  "event": "agent_completed",
  "timestamp": "2025-03-20T10:00:00Z"
}

Error Handling

If request fails:
{
  "status_code": 0,
  "body": null,
  "error": {
    "type": "timeout",
    "message": "Request exceeded 30-second timeout"
  }
}

Common Errors

ErrorCauseSolution
timeoutRequest too slowSimplify request, use pagination
connection_refusedService downCheck endpoint URL
ssl_errorCertificate issueVerify SSL settings
invalid_jsonResponse not JSONCheck Content-Type header
auth_failedInvalid credentialsVerify token/key

Cost

For current pricing details, see Pricing. Monitor in Account > Usage dashboard.

Best Practices

Use Correct Content-Type

Content-Type: application/json      # For JSON
Content-Type: application/x-www-form-urlencoded  # For forms
Content-Type: text/plain            # For text

Check Response Status

Always verify status_code before processing response.

Handle Rate Limiting

If you receive 429 Too Many Requests, wait before retrying.

Validate URLs

Ensure URLs are HTTPS and properly formatted.

Use Pagination

For large datasets, use pagination to avoid timeouts.

Troubleshooting

”Connection Refused”

  • Check API endpoint is correct and online
  • Verify firewall allows outbound HTTPS
  • Try different endpoint if available

”SSL Certificate Error”

  • URL should use HTTPS, not HTTP
  • Verify certificate is valid
  • Check server configuration

”Timeout”

  • Request taking too long (>30 seconds)
  • Simplify request or add pagination
  • Check server performance

”Authentication Failed”

  • Verify token/key is correct
  • Check token hasn’t expired
  • Ensure correct authentication method

Next Steps