\Guzzle\HttpStaticClient

Simplified interface to Guzzle that does not require a class to be instantiated

Summary

Methods
Properties
Constants
mount()
request()
get()
head()
delete()
post()
put()
patch()
options()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$client
N/A

Properties

Methods

mount()

mount(string  $className = 'Guzzle', \Guzzle\Http\ClientInterface  $client = null) 

Mount the client to a simpler class name for a specific client

Parameters

string $className

Class name to use to mount

\Guzzle\Http\ClientInterface $client

Client used to send requests

request()

request(string  $method, string  $url, array  $options = array()) : \Guzzle\Http\Message\Response|\Guzzle\Stream\Stream

Parameters

string $method

HTTP request method (GET, POST, HEAD, DELETE, PUT, etc)

string $url

URL of the request

array $options

Options to use with the request. See: Guzzle\Http\Message\RequestFactory::applyOptions()

Returns

\Guzzle\Http\Message\Response|\Guzzle\Stream\Stream

get()

get(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send a GET request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response

head()

head(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send a HEAD request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response

delete()

delete(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send a DELETE request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response

post()

post(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send a POST request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response

put()

put(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send a PUT request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response

patch()

patch(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send a PATCH request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response

options()

options(string  $url, array  $options = array()) : \Guzzle\Http\Message\Response

Send an OPTIONS request

Parameters

string $url

URL of the request

array $options

Array of request options

Returns

\Guzzle\Http\Message\Response