validateEndpoint
function validateEndpoint( input, options?, basePath?): ValidationResult;Defined in: src/validation.ts:170
Validate an Endpoint input: structure, URL policy, and static-header restrictions (the Standard Webhooks headers are reserved).
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
input |
unknown |
undefined |
options? |
UrlPolicyOptions |
{} |
basePath? |
string |
"endpoint" |
Returns
Section titled “Returns”ValidationResult
Example
Section titled “Example”import { validateEndpoint } from "@xtandard/webhooks";
const result = validateEndpoint({ url: "https://api.example.com/hooks" });// result.valid === true