Skip to content

HTTP/REST Connector

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)

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"
}
}
}

Send data via POST:

{
"type": "HttpWriter",
"config": {
"endpoint": "http://api.example.com/data",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TOKEN"
}
}
}

Update data via PUT:

{
"type": "HttpWriter",
"config": {
"endpoint": "http://api.example.com/data/123",
"method": "PUT",
"headers": {
"Content-Type": "application/json"
}
}
}
  • 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
{
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token",
"Accept": "application/json",
"User-Agent": "Meddle/1.0"
}
}
{
"type": "HttpReader",
"config": {
"endpoint": "https://api.weather.com/v1/current?location=factory",
"pollingRate": 300000,
"method": "GET",
"headers": {
"API-Key": "your-api-key"
}
}
}
{
"type": "HttpWriter",
"config": {
"endpoint": "https://hooks.example.com/webhook",
"method": "POST",
"headers": {
"Content-Type": "application/json"
}
}
}
  • MQTT - IoT messaging alternative
  • Reshape - Transform HTTP responses