SproutCMS

This is the code documentation for the SproutCMS project

function req()

Make a HTTP request. Returns the response content.

The request options array accepts the following keys:
  method     The HTTP method to use ('GET', 'POST')
  headers    An array of headers; see ::buildHeadersString
             for format information

Usage

Reponse HttpReq::req ( string $url , array $opts [, string/array $data ] );

Arguments

  1. string $url
    The URL to request.
  2. array $opts
    Request options array.
  3. string/array $data = NULL
    Request data, for POST requests.

Return value

  • Reponse
    or FALSE on error.