Request.php 838 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Easemob\Http;
  3. /**
  4. * @ignore 请求体类
  5. * @final
  6. */
  7. final class Request
  8. {
  9. /**
  10. * @var string $uri 请求 uri
  11. */
  12. public $uri;
  13. /**
  14. * @var string $method 请求方法
  15. */
  16. public $method;
  17. /**
  18. * @var mixed $headers 请求头
  19. */
  20. public $headers;
  21. /**
  22. * @var mixed $headers 请求体
  23. */
  24. public $body;
  25. /**
  26. * 构造方法
  27. * @param string $method 请求方法
  28. * @param string $uri 请求 uri
  29. * @param mixed $headers 请求头
  30. * @param mixed $body 请求体
  31. */
  32. public function __construct($method, $uri, $headers = null, $body = null)
  33. {
  34. $this->method = strtoupper($method);
  35. $this->uri = $uri;
  36. $this->headers = $headers;
  37. $this->body = $body;
  38. }
  39. }