Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MessageFormatter.php

function MessageFormatter::headers

Get headers from message as string

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 190

Class

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

Namespace

GuzzleHttp

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal