You are here

public function RequestBuilder::withHeader in Auth0 Single Sign On 8.2

Parameters

Header|string $header:

null|string $value:

Return value

$this

1 call to RequestBuilder::withHeader()
RequestBuilder::withHeaders in vendor/auth0/auth0-php/src/API/Helpers/RequestBuilder.php

File

vendor/auth0/auth0-php/src/API/Helpers/RequestBuilder.php, line 335

Class

RequestBuilder
Class RequestBuilder

Namespace

Auth0\SDK\API\Helpers

Code

public function withHeader($header, $value = null) {
  if ($header instanceof Header) {
    $this->headers[$header
      ->getHeader()] = $header
      ->getValue();
  }
  else {
    $this->headers[$header] = $value;
  }
  return $this;
}