REST API & Webhooks
Core API Hook: HttpClient (System.Net.Http)
Send dynamic HTTP GET, POST, PUT, or DELETE requests containing custom headers and JSON content directly to external cloud endpoints.
Configuration Parameters
| Parameter | Type | Description |
|---|---|---|
| Target | string | The destination endpoint URL address to send the HTTP payload. |
| Arguments | string | Target HTTP method configuration followed by JSON body payload (e.g. 'POST; {\"status\": \"active\"}'). |
| Headers | string | Custom HTTP request header values formatted as a flat line config. |
config.json Mapping
{
"Type": "HttpRequest",
"Name": "Ping IoT Server",
"Target": "https://api.isocent.com/v1/trigger",
"Arguments": "POST; {\"event\": \"hotkey_triggered\"}",
"Headers": "Authorization: Bearer my_secret_token"
}
Save inside database layout actions configuration map.
Native Execution Hook
// HttpRequest execution logic
using var client = new HttpClient();
var parts = action.Arguments.Split(';', 2);
var method = parts[0].Trim();
var payload = parts.Length > 1 ? parts[1].Trim() : "";
var request = new HttpRequestMessage(new HttpMethod(method), action.Target);
if (!string.IsNullOrEmpty(payload)) {
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
}
if (!string.IsNullOrEmpty(action.Headers)) {
// Parse headers and add to request.Headers
request.Headers.Add("Authorization", "Bearer token");
}
var response = await client.SendAsync(request);
Executed within IsoCore remapping runtime loop.
← Back to Actions Directory
IsoKey Module: HttpRequest