Skip to content

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).

Parameter Type Default value
input unknown undefined
options? UrlPolicyOptions {}
basePath? string "endpoint"

ValidationResult

import { validateEndpoint } from "@xtandard/webhooks";
const result = validateEndpoint({ url: "https://api.example.com/hooks" });
// result.valid === true