You are here

private function MultipartStream::getHeaders in Lockr 7.3

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

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

File

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

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) {
  $str = '';
  foreach ($headers as $key => $value) {
    $str .= "{$key}: {$value}\r\n";
  }
  return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
}