updated async http requests

This commit is contained in:
kremsy
2017-03-30 20:27:57 +02:00
parent 1369aab401
commit 389ff7925c
6 changed files with 65 additions and 27 deletions

View File

@ -84,6 +84,7 @@ class UsageReporter implements TimerListener {
$url = ManiaControl::URL_WEBSERVICE . 'usagereport';
$asyncRequest = new AsyncHttpRequest($this->maniaControl, $url);
$asyncRequest->setContentType(AsyncHttpRequest::CONTENT_TYPE_JSON);
$asyncRequest->setContent($usageReport);
$asyncRequest->setCallable(function ($response, $error) {
$response = json_decode($response);