====Webhook==== This type of [[start|distribution]] sends incoming data to an HTTP server. Note that as live data can be very fast, we suggest the webhook server must be able to handle a high rate of incoming calls. ===Type Name=== The type name to use in your configuration is **webhook**. ===Configuration=== The following configuration options are accepted... ^Name^Notes^Purpose^ |hostname|Required|The DNS name or IP of your HTTP server| |port|Default 80/443|The port number used to communicate to the HTTP server| |resource||The resource name to push data to (added after the hostname and port)| |headers||Name/value pairs to be set as part of the request header| |method|POST|The method of transmission| The final URL is built out of //hostname//, //port// and //prefix//. For example... { "config": { "hostname": "https://myserver.com", "resource": "/api/submit" } } ...will submit requests to **https://myserver.com/api/submit**. ===Methods=== //All of the following methods will include examples where we are sending the value 'Main Oven.Temperature' to '192.0'.// The following methods are available... ==GET== The request is made as a standard //GET// web request. https://myserver.com/api/submit?Main Oven.Temperature=192.0 ==POST== The request is made as a standard //POST// web request, with the content encoded as //form data//. https://myserver.com/api/submit BODY: ...encoded form data... ==POSTBODY== The request is made as a //POST// web request, with the content sent as a JSON-encoded object in the body.. https://myserver.com/api/submit BODY: { "Main Oven.Temperature": 192.0 } ==POSTBATCH== The request is made as a single. consolidated //POST// web request, with the content sent as a form... https://myserver.com/api/submit BODY: ...encoded form data with multiple values... ==POSTBATCHBODY== The request is made as a single. consolidated //POST// web request, with the content sent as a JSON encoded body... https://myserver.com/api/submit BODY: { "Main Oven.Temperature": 192.0,"Main Oven.Target": 195.0 }