Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
$client = $this->clientService->newClient();
$options = [];
$options['body'] = json_encode($data);
- $options['headers'] = $webhookListener->getHeaders();
+ $options['headers'] = $webhookListener->getHeaders() ?? [];
try {
switch ($webhookListener->getAuthMethodEnum()) {
case AuthMethod::None:
/**
* @method void setUserId(string $userId)
* @method string getUserId()
+ * @method ?array getHeaders()
*/
class WebhookListener extends Entity implements \JsonSerializable {
/** @var ?string id of the app_api application who added the webhook listener */