- Affected version
- 2.3.0 Beta 2
Changing the options for sending a webhook request currently requires overwriting whole method
Could the code to set the options be moved to its own method, eg. smth. like
?
This would allow to modify the options easily.
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.