class ApiRequester

Class ApiRequester

Constants

BASE_URL

LOGIN_DATA

Methods

static 
instance()

No description

__construct()

ApiRequester constructor.

get($url, $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

No description

post($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

No description

head($url, $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

No description

patch($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

No description

put($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

No description

delete($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

No description

submit(string $url, array $fields, string $method = RequestInterface::METHOD_POST, array $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Sends a form request.

call(string $url, string $method, array $headers = array(), string $content = '')

Sends a request.

send(RequestInterface $request, MessageInterface $response = null)

Sends a request.

getLastRequest()

No description

getLastResponse()

No description

setClient(ClientInterface $client)

No description

getClient()

No description

setMessageFactory(FactoryInterface $factory)

No description

getMessageFactory()

No description

Details

at line 38
static instance()

at line 50
__construct()

ApiRequester constructor.

at line 59
get($url, $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Parameters

$url
$headers

at line 64
post($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Parameters

$url
$content
$headers

at line 69
head($url, $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Parameters

$url
$headers

at line 74
patch($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Parameters

$url
$content
$headers

at line 79
put($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Parameters

$url
$content
$headers

at line 84
delete($url, $content = '', $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Parameters

$url
$content
$headers

at line 99
MessageInterface submit(string $url, array $fields, string $method = RequestInterface::METHOD_POST, array $headers = array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'))

Sends a form request.

Parameters

string $url The URL to submit to
array $fields An array of fields
string $method The request method to use
array $headers An array of request headers

Return Value

MessageInterface The response object

at line 128
MessageInterface call(string $url, string $method, array $headers = array(), string $content = '')

Sends a request.

Parameters

string $url The URL to call
string $method The request method to use
array $headers An array of request headers
string $content The request content

Return Value

MessageInterface The response object

at line 154
MessageInterface send(RequestInterface $request, MessageInterface $response = null)

Sends a request.

Parameters

RequestInterface $request A request object
MessageInterface $response A response object

Return Value

MessageInterface The response

at line 186
getLastRequest()

at line 191
getLastResponse()

at line 196
setClient(ClientInterface $client)

Parameters

ClientInterface $client

at line 201
getClient()

at line 206
setMessageFactory(FactoryInterface $factory)

Parameters

FactoryInterface $factory

at line 211
getMessageFactory()