Overview

Packages

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

Classes

  • Requests_Transport_cURL
  • Requests_Transport_fsockopen

Interfaces

  • Requests_Transport
  • 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_Transport in Requests 2.x.

Interface Requests_Transport

Base HTTP transport

Direct known implementers

Requests_Transport_cURL, Requests_Transport_fsockopen
Package: Requests\Transport
Located at Requests/Transport.php
Methods summary
public string
# request( string $url, array $headers = array(), string|array $data = array(), array $options = array() )

Perform a request

Perform a request

Parameters

$url
URL to request
$headers
Associative array of request headers
$data
Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
$options
Request options, see Requests::response() for documentation

Returns

string
Raw HTTP result
public array
# request_multiple( array $requests, array $options )

Send multiple requests simultaneously

Send multiple requests simultaneously

Parameters

$requests
Request data (array of 'url', 'headers', 'data', 'options') as per Requests_Transport::request()
$options
Global options, see Requests::response() for documentation

Returns

array
Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
public static boolean
# test( )

Self-test whether the transport can be used

Self-test whether the transport can be used

Returns

boolean
Requests 1.8.1 API Documentation API documentation generated by ApiGen