Filter since v3.3.0
fswa_notification_http_args
Tune the outgoing HTTP request a notification channel makes — timeout, headers, proxy, TLS — per destination or channel type.
$
/ Signature
apply_filters( 'fswa_notification_http_args', $args, $url, $type )
/ When it fires
Right before every HTTP-backed channel sends (email goes through wp_mail() and does not pass here). Separate from fswa_http_args, which shapes webhook deliveries themselves, so a notification never inherits a header meant for a webhook endpoint.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $args | param | array | yes | The `wp_remote_request()` arguments: `method`, `timeout` (10 s), `headers`, `body`, `redirection`, `user-agent`. |
| $url | param | string | yes | The destination URL (a Slack or Discord webhook, the Telegram Bot API, a Twilio endpoint, …). |
| $type | param | string | yes | The channel type: `slack`, `discord`, `telegram`, `teams`, `google_chat`, `mattermost`, `pushover`, `ntfy`, `twilio_sms`, `twilio_whatsapp`, `pagerduty`, `webhook`, or a custom driver's type. |
/ Returns
array The arguments to send with./ Examples
Give Telegram a longer timeout on a slow host
add_filter( 'fswa_notification_http_args', function ( array $args, string $url, string $type ) { if ( $type === 'telegram' ) { $args['timeout'] = 20; } return $args; }, 10, 3 );
/ Related
Ready Your next automation is
Your next automation is
one sentence away.
$ wp plugin install flowsystems-webhook-actions --activate