restructuring filereader stage 2

This commit is contained in:
kremsy
2015-09-30 22:33:48 +02:00
parent 62105611bf
commit 8aa0bbba86
2 changed files with 20 additions and 33 deletions

View File

@ -8,13 +8,9 @@ use cURL\Event;
use ManiaControl\ManiaControl;
class AsyncHttpRequest {
const TYPE_GET = "GET";
const TYPE_POST = "POST";
/** @var ManiaControl $maniaControl */
private $maniaControl;
private $type;
private $url;
private $function;
private $content;
@ -22,9 +18,8 @@ class AsyncHttpRequest {
private $contentType = 'text/xml; charset=UTF-8;';
private $headers = array();
public function __construct($maniaControl, $type, $url) {
public function __construct($maniaControl, $url) {
$this->maniaControl = $maniaControl;
$this->type = $type;
$this->url = $url;
}
@ -127,4 +122,20 @@ class AsyncHttpRequest {
$this->headers = $headers;
return $this;
}
/**
* @return string
*/
public function getContentType() {
return $this->contentType;
}
/**
* @param string $contentType
* @return $this
*/
public function setContentType($contentType) {
$this->contentType = $contentType;
return $this;
}
}