Requests_Session::request( string $url, array $headers = array(), array|null $data = array(), string $type = Requests::GET, array $options = array() ): Requests_Response

In this article

Main interface for HTTP requests

Description

This method initiates a request and sends it via a transport before parsing.

See also

Parameters

$urlstringrequired
URL to request
$headersarrayoptional
Extra headers to send with the request

Default:array()

$dataarray|nulloptional
Data to send either as a query string for GET/HEAD requests, or in the body for POST requests

Default:array()

$typestringoptional
HTTP request type (use Requests constants)

Default:Requests::GET

$optionsarrayoptional
Options for the request (see Requests::request)

Default:array()

Return

Requests_Response

Source

User Contributed Notes

You must log in before being able to contribute a note or feedback.