Documentation

CustomHttpClient
in package

This library should really be using Guzzle or something, but while hacking away I just had this laying around.

I've made some modifications to handle how the router API rotates random tokens in the headers.

Table of Contents

$connectionTimeout  : mixed
$manualCookieData  : mixed
$requestToken  : mixed
$requestTokenOne  : mixed
$requestTokenTwo  : mixed
$responseTimeout  : mixed
__destruct()  : mixed
Destructor to make phpstan happy.
get()  : mixed
Performs a HTTP GET to the specified URL.
getToken()  : mixed
We need the current token to make the login hash.
HandleHeaderLine()  : mixed
Handles the HTTP Response header lines from cURL requests, so we can extract all those tokens.
postXml()  : mixed
Makes HTTP POST requests containing XML data to the router.
setSecurity()  : void
We will call this, when we have parsed the data out from a login request.
getCurlObj()  : mixed
Builds the Curl Object.

Properties

Methods

__destruct()

Destructor to make phpstan happy.

public __destruct() : mixed
Return values
mixed

get()

Performs a HTTP GET to the specified URL.

public get(mixed $url) : mixed
Parameters
$url : mixed
Return values
mixed

getToken()

We need the current token to make the login hash.

public getToken() : mixed
Return values
mixed

HandleHeaderLine()

Handles the HTTP Response header lines from cURL requests, so we can extract all those tokens.

public HandleHeaderLine(mixed $curl, mixed $header_line) : mixed
Parameters
$curl : mixed
$header_line : mixed
Return values
mixed

postXml()

Makes HTTP POST requests containing XML data to the router.

public postXml(mixed $url, mixed $xmlString) : mixed
Parameters
$url : mixed
$xmlString : mixed
Return values
mixed

setSecurity()

We will call this, when we have parsed the data out from a login request.

public setSecurity(mixed $cookie, mixed $token) : void
Parameters
$cookie : mixed
$token : mixed
Return values
void

getCurlObj()

Builds the Curl Object.

private getCurlObj(mixed $url[, mixed $headerFields = [] ]) : mixed
Parameters
$url : mixed
$headerFields : mixed = []
Return values
mixed

Search results