HTTP/REST Connector
Overview
Section titled “Overview”The HTTP connector enables communication with REST APIs and web services.
Connector Types:
HttpReader- Poll HTTP endpoints (GET requests)HttpWriter- Send data to HTTP endpoints (POST, PUT, DELETE)
HTTP Reader
Section titled “HTTP Reader”Poll an HTTP endpoint periodically:
{ "type": "HttpReader", "config": { "endpoint": "http://api.example.com/data", "pollingRate": 5000, "method": "GET", "headers": { "Authorization": "Bearer YOUR_TOKEN", "Accept": "application/json" } }}HTTP Writer (POST)
Section titled “HTTP Writer (POST)”Send data via POST:
{ "type": "HttpWriter", "config": { "endpoint": "http://api.example.com/data", "method": "POST", "headers": { "Content-Type": "application/json", "Authorization": "Bearer YOUR_TOKEN" } }}HTTP Writer (PUT)
Section titled “HTTP Writer (PUT)”Update data via PUT:
{ "type": "HttpWriter", "config": { "endpoint": "http://api.example.com/data/123", "method": "PUT", "headers": { "Content-Type": "application/json" } }}Configuration Parameters
Section titled “Configuration Parameters”- endpoint: Full URL including protocol
- method: HTTP method (GET, POST, PUT, DELETE)
- pollingRate: (Reader only) Polling interval in milliseconds
- headers: Custom HTTP headers (object)
- timeout: (Optional) Request timeout in milliseconds
Common Headers
Section titled “Common Headers”{ "headers": { "Content-Type": "application/json", "Authorization": "Bearer token", "Accept": "application/json", "User-Agent": "Meddle/1.0" }}Use Cases
Section titled “Use Cases”1. Weather API Integration
Section titled “1. Weather API Integration”{ "type": "HttpReader", "config": { "endpoint": "https://api.weather.com/v1/current?location=factory", "pollingRate": 300000, "method": "GET", "headers": { "API-Key": "your-api-key" } }}2. Webhook Integration
Section titled “2. Webhook Integration”{ "type": "HttpWriter", "config": { "endpoint": "https://hooks.example.com/webhook", "method": "POST", "headers": { "Content-Type": "application/json" } }}