Previous Page
dump()

Solar_Http_Request_Adapter
fetch()

Next Page
fetchRaw()

fetch()

public Solar_Http_Response|array fetch ( bool $as_array default false )

Fetches from the specified URI and returns a Solar_Http_Response object (or an array of objects if there was more than one response).

Parameters

  • (bool) $as_array: When false, returns only the last response from the request (a Solar_Http_Response object). When true, returns an array of response objects representing all responses. Useful when the request has one or more redirections.

Returns

  • (Solar_Http_Response|array)

Description

Fetches from the specified URI and returns a Solar_Http_Response object (or an array of objects if there was more than one response).