mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 10:07:12 +00:00
Input Stream bindings (#18)
* Initial aws_input_stream <-> php_stream implementation * Added comments about useful references * updated aws-crt-ffi to get latest aws-lc, faster builds * Fixed inconsistency between PHP5/7 versions of php_stream_from_zval
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace AWS\CRT\HTTP;
|
||||
|
||||
abstract class Message {
|
||||
private $path = "";
|
||||
private $query = [];
|
||||
private $headers = [];
|
||||
|
||||
public function __construct($path, $query = [], $headers = []) {
|
||||
$this->path = $path;
|
||||
$this->query = $query;
|
||||
$this->headers = $headers;
|
||||
}
|
||||
}
|
||||
|
||||
class Request extends Message {
|
||||
private $body_stream = null;
|
||||
|
||||
public function __construct($path, $query = [], $headers = [], $body_stream = null) {
|
||||
parent::__construct($path, $query, $headers);
|
||||
$this->body_stream = $body_stream;
|
||||
}
|
||||
}
|
||||
|
||||
class Response extends Message {
|
||||
private $status_code;
|
||||
|
||||
public function __construct($path, $headers, $status_code) {
|
||||
parent::__construct($path, [], $headers);
|
||||
$this->status_code = $status_code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user