class CRM_Cxn_CiviCxnHttp extends PhpHttp

Class CRM_Cxn_CiviCxnHttp

This extends the PhpHttp client used by CiviConnect and adds: - Force-cache support for GET requests - Compliance with SSL policy

Properties

static protected $singleton
protected CRM_Utils_Cache_Interface|null $cache

Methods

singleton(bool $fresh = FALSE)

Singleton object.

__construct(CRM_Utils_Cache_Interface|null $cache)

The cache data store.

array
send(string $verb, string $url, string $blob, array $headers = [])

Send.

array
createStreamOpts(string $verb, string $url, string $blob, array $headers)

Create stream options.

Details

at line 27
static CRM_Cxn_CiviCxnHttp singleton(bool $fresh = FALSE)

Singleton object.

Parameters

bool $fresh

Return Value

CRM_Cxn_CiviCxnHttp

Exceptions

CRM_Core_Exception

at line 45
__construct(CRM_Utils_Cache_Interface|null $cache)

The cache data store.

Parameters

CRM_Utils_Cache_Interface|null $cache

at line 60
array send(string $verb, string $url, string $blob, array $headers = [])

Send.

Parameters

string $verb
string $url
string $blob
array $headers Array of headers (e.g. "Content-type" => "text/plain").

Return Value

array array($headers, $blob, $code)

at line 100
protected array createStreamOpts(string $verb, string $url, string $blob, array $headers)

Create stream options.

Parameters

string $verb
string $url
string $blob
array $headers

Return Value

array

Exceptions

Exception

at line 121
CRM_Utils_Cache_Interface|null getCache()

Get cache.

Return Value

CRM_Utils_Cache_Interface|null