class SendWebhook

Overview

POSTs the discovered endpoint catalog as a single JSON document to a user-supplied webhook URL. The body shape is the same one -f json would have written:

{ "endpoints": [...], "endpoint_count": , "noir_version": "" }

Slack incoming webhooks, Discord webhook endpoints, Zapier/n8n triggers, and custom internal receivers all accept arbitrary JSON bodies, so a single contract covers the common destinations. If a receiver needs a more specific format (Slack's {"text": "..."} blocks, for example), users are expected to route through a transformer rather than have noir grow per-platform formatters.

Network errors are swallowed at debug level so a misconfigured webhook URL doesn't crash the scan — same posture as the other Deliver subclasses.

Defined in:

deliver/send_webhook.cr

Instance Method Summary

Instance methods inherited from class Deliver

apply_all(endpoints : Array(Endpoint)) apply_all, apply_filters(endpoints : Array(Endpoint)) apply_filters, apply_matchers(endpoints : Array(Endpoint)) apply_matchers, filters : Array(String) filters, headers : Hash(String, String) headers, matchers : Array(String) matchers, proxy : String proxy, run run

Constructor methods inherited from class Deliver

new(options : Hash(String, YAML::Any)) new

Instance Method Detail

def run(endpoints : Array(Endpoint), webhook_url : String) #

[View source]