Overview

Packages

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

Classes

  • Requests_Hooks
  • Requests_IDNAEncoder
  • Requests_IPv6
  • Requests_IRI
  • Requests_SSL
  • Requests_Utility_CaseInsensitiveDictionary
  • Requests_Utility_FilteredIterator

Interfaces

  • Requests_Hooker
  • 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_Utility_CaseInsensitiveDictionary in Requests 2.x.

Class Requests_Utility_CaseInsensitiveDictionary

Case-insensitive dictionary, suitable for HTTP headers

Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate

Direct known subclasses

Requests_Response_Headers
Package: Requests\Utilities
Located at Requests/Utility/CaseInsensitiveDictionary.php
Methods summary
public
# __construct( array $data = array() )

Creates a case insensitive dictionary.

Creates a case insensitive dictionary.

Parameters

$data
Dictionary/map to convert to case-insensitive
public boolean
# offsetExists( string $key )

Check if the given item exists

Check if the given item exists

Parameters

$key
Item key

Returns

boolean
Does the item exist?

Implementation of

ArrayAccess::offsetExists()
public string|null
# offsetGet( string $key )

Get the value for the item

Get the value for the item

Parameters

$key
Item key

Returns

string|null
Item value (null if offsetExists is false)

Implementation of

ArrayAccess::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)

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( string $key )

Unset the given header

Unset the given header

Parameters

$key

Implementation of

ArrayAccess::offsetUnset()
public ArrayIterator
# getIterator( )

Get an iterator for the data

Get an iterator for the data

Returns

ArrayIterator

Implementation of

IteratorAggregate::getIterator()
public array
# getAll( )

Get the headers as an array

Get the headers as an array

Returns

array
Header data
Properties summary
protected array $data

Actual item data

Actual item data

# array()
Requests 1.8.1 API Documentation API documentation generated by ApiGen