Class HTTPClient
HTTP client used to requests on the Maniaplanet Web Services API. Service classes of the SDK extends this base class.
Direct known subclasses
ManiaLive\Features\UpdaterClient, Maniaplanet\WebServices\Competitions, Maniaplanet\WebServices\Payments, Maniaplanet\WebServices\Players, Maniaplanet\WebServices\Rankings\Canyon, Maniaplanet\WebServices\Rankings\Storm, Maniaplanet\WebServices\Rankings\Title, Maniaplanet\WebServices\Servers, Maniaplanet\WebServices\Teams, Maniaplanet\WebServices\TrustCircles, Maniaplanet\WebServices\Zones, Maniaplanet\WebServices\Foobar, Maniaplanet\WebServices\Links, Maniaplanet\WebServices\ManiaConnect\Client, Maniaplanet\WebServices\ManiaFlash, Maniaplanet\WebServices\ManiaHome\Comments, Maniaplanet\WebServices\ManiaHome\ManialinkPublisher, Maniaplanet\WebServices\ManiaHome\ServerPublisher, Maniaplanet\WebServices\ManialinksIndirect known subclasses
Maniaplanet\WebServices\ManiaConnect\PlayerNamespace: Maniaplanet\WebServices
Located at libraries/Maniaplanet/WebServices/HTTPClient.php
public
|
#
__construct( string $username = null, string $password = null )
Default constructor. Children classes should, if they need to override it, keep the same first two parameters (the API credentials) to keep the usage of the SDK simple. |
protected
mixed
|
string |
VERSION
|
'3.0.6' |
protected
string
|
$APIURL | 'https://ws.maniaplanet.com' |
#
URL of the Web Services API |
protected
string
|
$username |
|
#
HTTP username used to authenticate the client via HTTP Basic Authentication |
protected
string
|
$password |
|
#
HTTP password used to authenticate the client via HTTP Basic Authentication |
protected
boolean
|
$enableAuth | true |
#
Whether to use HTTP Basic authentication. Enabled by default |
protected
boolean
|
$throwExceptions | true |
#
Whether to throw exceptions or not. Default is true except in the ManiaHome class. |
public
|
$lastException |
|
#
Last exception if throwExceptions is set to false |
protected
callable
|
$contentType | 'application/json' |
#
Content-Type HTTP Header |
protected
callable
|
$accept | 'application/json' |
#
Accept HTTP header |
protected
callable
|
$serializeCallback | 'json_encode' |
#
Callback for serializing data |
protected
string
|
$unserializeCallback | 'json_decode' |
#
Callback for unserializing data received by the API |
protected
array[string]
|
$headers | array() |
#
Additional headers to be sent with the requests |