RawResponse.php 868 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. namespace Hyperf\Engine\Http;
  12. final class RawResponse
  13. {
  14. /**
  15. * @var int
  16. */
  17. public $statusCode = 0;
  18. /**
  19. * @var string[][]
  20. */
  21. public $headers = [];
  22. /**
  23. * @var string
  24. */
  25. public $body = '';
  26. /**
  27. * Protocol version.
  28. * @var string
  29. */
  30. public $version = '';
  31. /**
  32. * @param string[][] $headers
  33. */
  34. public function __construct(int $statusCode, array $headers, string $body, string $version)
  35. {
  36. $this->statusCode = $statusCode;
  37. $this->headers = $headers;
  38. $this->body = $body;
  39. $this->version = $version;
  40. }
  41. }