You are here

public function Webhook::addHeaders in Webhooks 8

Add to the headers.

Parameters

array $headers: A headers array.

Return value

Webhook The webhook.

4 calls to Webhook::addHeaders()
Webhook::setContentType in src/Webhook.php
Set the content type.
Webhook::setEvent in src/Webhook.php
Set the event.
Webhook::setSignature in src/Webhook.php
Set the payload signature.
Webhook::setUuid in src/Webhook.php
Set the unique id.

File

src/Webhook.php, line 134

Class

Webhook
Class Webhook .

Namespace

Drupal\webhooks

Code

public function addHeaders(array $headers) {
  foreach ($headers as $name => $value) {
    $this->headers[strtolower($name)] = $value;
  }
  return $this;
}