restructuring filereader stage 2
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user