Custom request handler function.
Get the custom handleRequest function.
Set the custom handlerRequest function.
Get the holdResponse flag.
Set hold response flag. This allows you to run tunnel logic and send the response after completion. You must call releaseResponse later if you use this.
Get the HTTP method.
Set the HTTP method.
Get the interface manager. Used to manage interface instances for session handling.
Get the _name.
Get the _path.
Set the _path as a string or a string array. All parts are URI encoded. Create directory structures with an array: ["one", "two"] results in "/one/two".
Creates a new job
On load, do nothing.
Releases the webhook response when tunnel run logic is complete.
The webhook job that triggered the webhook nest.
The optional response message, if not using a custom request handler.
var webhook = af.createWebhookNest(["jobs", "submit"], "post");
webhook.holdResponse = true; // Keeps the response from being sent immediately
var tunnel = af.createTunnel("Dwight's test tunnel");
tunnel.watch(webhook);
tunnel.run(function(job, nest){
setTimeout(function(){
nest.releaseResponse(job, "Worked!"); // Sends response
}, 1500); // After 1.5 seconds
});
Add webhook to server watch list.
Generated using TypeDoc
Webhook Nest constructor