Stable\Cdn\Client::call
API request call (via cURL)
Signature
protected function call(string
$namespace,
[string
$path = NULL,
string
$method,
[array
$params = ]] )
Parameters
$namespace
—
string
- - API namespace, currently "files" namespace only
$path
—
string
- - PATH for request, eg. path for a existing file)
$method
—
string
- - HTTP method (GET|POST|DELETE)
$params
—
array
- - call params, eg. metadata for uploaded file
Returns
- (stdClass)
- - decoded JSON according to API definition or null in case of system fault
Errors/Exceptions
-
Exception
- - in case of wrong method