Fixed Modifying webhook request options requires overwriting entire method

Kirby

Well-known member
Affected version
2.3.0 Beta 2
Changing the options for sending a webhook request currently requires overwriting whole method run

Could the code to set the options be moved to its own method, eg. smth. like

PHP:
protected function getRequestOptions(Webhook $webhook): array
{
    $options['headers'] = [
        'XF-Content-Type' => $this->data['content_type'],
        'XF-Webhook-Event' => $this->data['event'],
        'XF-Webhook-Id' => $webhook->webhook_id,
    ];
   
    [...]

    return $options;
}
?

This would allow to modify the options easily.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 3).

Change log:
Make it easier to override webhook request options
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom