\CommuniqueCurlHTTPClient

CurlHTTP Client

This class is used internally by the main client library for performing HTTP requests using cURl. This HTTP client may be swapped out for another by passing a third argument to the library constructor.

Summary

Methods
Properties
Constants
__construct()
request()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$curl
N/A

Properties

$curl

$curl : Object

A reference to the cURL wrapper we're using

Type

Object

Methods

__construct()

__construct(\Communique\Curl  $curl = null) 

Constructs the Curl HTTP adapter

Parameters

\Communique\Curl $curl

A cURL object wrapper

request()

request(\Communique\RESTClientRequest  $request) : \Communique\RESTClientResponse

Make an HTTP request

Parameters

\Communique\RESTClientRequest $request

Request object

Throws

\Communique\CommuniqueRESTConnectionException

This is thrown if cURL is unable to connect (this could be because the server is not available or the DNS record is not resolvable)

\Communique\CommuniqueRESTSSLException

REST SSL exception. This is thrown for things such as SSL certificate errors or SSL handshake errors.

Returns

\Communique\RESTClientResponse

$response Response object