You are here

private function MessageTrait::normalizeHeaderValue in Auth0 Single Sign On 8.2

3 calls to MessageTrait::normalizeHeaderValue()
MessageTrait::setHeaders in vendor/guzzlehttp/psr7/src/MessageTrait.php
MessageTrait::withAddedHeader in vendor/guzzlehttp/psr7/src/MessageTrait.php
MessageTrait::withHeader in vendor/guzzlehttp/psr7/src/MessageTrait.php

File

vendor/guzzlehttp/psr7/src/MessageTrait.php, line 159

Class

MessageTrait
Trait implementing functionality common to requests and responses.

Namespace

GuzzleHttp\Psr7

Code

private function normalizeHeaderValue($value) {
  if (!is_array($value)) {
    return $this
      ->trimHeaderValues([
      $value,
    ]);
  }
  if (count($value) === 0) {
    throw new \InvalidArgumentException('Header value can not be an empty array.');
  }
  return $this
    ->trimHeaderValues($value);
}