You are here

private function MessageFormatter::headers in Lockr 7.3

1 call to MessageFormatter::headers()
MessageFormatter::format in vendor/guzzlehttp/guzzle/src/MessageFormatter.php
Returns a formatted message string.

File

vendor/guzzlehttp/guzzle/src/MessageFormatter.php, line 171

Class

MessageFormatter
Formats log messages using variable substitutions for requests, responses, and other transactional data.

Namespace

GuzzleHttp

Code

private function headers(MessageInterface $message) {
  $result = '';
  foreach ($message
    ->getHeaders() as $name => $values) {
    $result .= $name . ': ' . implode(', ', $values) . "\r\n";
  }
  return trim($result);
}