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

Breadcrumb

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

function MultipartStream::getHeaders

Get the headers needed before transferring the content of a POST file

Parameters

string[] $headers:

1 call to MultipartStream::getHeaders()
MultipartStream::addElement in vendor/guzzlehttp/psr7/src/MultipartStream.php

File

vendor/guzzlehttp/psr7/src/MultipartStream.php, line 56

Class

MultipartStream
Stream that when read returns bytes for a streaming multipart or multipart/form-data stream.

Namespace

GuzzleHttp\Psr7

Code

private function getHeaders(array $headers) : string {
    $str = '';
    foreach ($headers as $key => $value) {
        $str .= "{$key}: {$value}\r\n";
    }
    return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
}

API Navigation

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