Overview

Packages

  • Requests
    • Authentication
    • Cookies
    • Proxy
    • Session
    • Transport
    • Utilities

Classes

  • Requests
  • Requests_Response
  • Requests_Response_Headers

Exceptions

  • Requests_Exception
  • Requests_Exception_HTTP
  • Requests_Exception_HTTP_304
  • Requests_Exception_HTTP_305
  • Requests_Exception_HTTP_306
  • Requests_Exception_HTTP_400
  • Requests_Exception_HTTP_401
  • Requests_Exception_HTTP_402
  • Requests_Exception_HTTP_403
  • Requests_Exception_HTTP_404
  • Requests_Exception_HTTP_405
  • Requests_Exception_HTTP_406
  • Requests_Exception_HTTP_407
  • Requests_Exception_HTTP_408
  • Requests_Exception_HTTP_409
  • Requests_Exception_HTTP_410
  • Requests_Exception_HTTP_411
  • Requests_Exception_HTTP_412
  • Requests_Exception_HTTP_413
  • Requests_Exception_HTTP_414
  • Requests_Exception_HTTP_415
  • Requests_Exception_HTTP_416
  • Requests_Exception_HTTP_417
  • Requests_Exception_HTTP_418
  • Requests_Exception_HTTP_428
  • Requests_Exception_HTTP_429
  • Requests_Exception_HTTP_431
  • Requests_Exception_HTTP_500
  • Requests_Exception_HTTP_501
  • Requests_Exception_HTTP_502
  • Requests_Exception_HTTP_503
  • Requests_Exception_HTTP_504
  • Requests_Exception_HTTP_505
  • Requests_Exception_HTTP_511
  • Requests_Exception_HTTP_Unknown
  • Requests_Exception_Transport
  • Requests_Exception_Transport_cURL
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Warning! You are currently reading the documentation for Requests 1.x.

It is recommended to upgrade to Requests 2.x at your earliest convenience. Upgrading to Requests 2.x is fairly straight-forward.
A full list of the changes can be found in the Changelog.

Visit the documentation for Requests_Response_Headers in Requests 2.x.

Class Requests_Response_Headers

Case-insensitive dictionary, suitable for HTTP headers

Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate
Extended by Requests_Response_Headers
Package: Requests
Located at Requests/Response/Headers.php
Methods summary
public string|null
# offsetGet( string $key )

Get the given header

Get the given header

Unlike self::getValues(), this returns a string. If there are multiple values, it concatenates them with a comma as per RFC2616.

Avoid using this where commas may be used unquoted in values, such as Set-Cookie headers.

Parameters

$key

Returns

string|null
Header value

Overrides

Requests_Utility_CaseInsensitiveDictionary::offsetGet()
public
# offsetSet( string $key, string $value )

Set the given item

Set the given item

Parameters

$key
Item name
$value
Item value

Throws

Requests_Exception
On attempting to use dictionary as list (invalidset)

Overrides

Requests_Utility_CaseInsensitiveDictionary::offsetSet()
public array|null
# getValues( string $key )

Get all values for a given header

Get all values for a given header

Parameters

$key

Returns

array|null
Header values
public string
# flatten( string|array $value )

Flattens a value into a string

Flattens a value into a string

Converts an array into a string by imploding values with a comma, as per RFC2616's rules for folding headers.

Parameters

$value
Value to flatten

Returns

string
Flattened value
public ArrayIterator
# getIterator( )

Get an iterator for the data

Get an iterator for the data

Converts the internal

Returns

ArrayIterator

Overrides

Requests_Utility_CaseInsensitiveDictionary::getIterator()
Methods inherited from Requests_Utility_CaseInsensitiveDictionary
__construct(), getAll(), offsetExists(), offsetUnset()
Properties inherited from Requests_Utility_CaseInsensitiveDictionary
$data
Requests 1.8.1 API Documentation API documentation generated by ApiGen