The clean & modern RSS server that doesn't give you any crap.
https://thearsse.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
637 B
21 lines
637 B
7 years ago
|
<?php
|
||
|
declare(strict_types=1);
|
||
|
namespace JKingWeb\NewsSync\REST;
|
||
|
|
||
|
class Request {
|
||
|
public $method;
|
||
|
public $url;
|
||
|
public $type;
|
||
|
public $stream;
|
||
|
|
||
|
function __construct(string $method = null, string $url = null, string $bodyStream = null, string $contentType = null) {
|
||
|
if(is_null($method)) $method = $_SERVER['REQUEST_METHOD'];
|
||
|
if(is_null($url)) $url = $_SERVER['REQUEST_URI'];
|
||
|
if(is_null($bodyStream)) $bodyStream = "php://input";
|
||
|
if(is_null($contentType)) $contentType = $_SERVER['HTTP_CONTENT_TYPE'];
|
||
|
$this->method = method;
|
||
|
$this->url = $url;
|
||
|
$this->stream = $bodyStream;
|
||
|
$this->type = $contentType;
|
||
|
}
|
||
|
}
|