sumeko / http-exception
HTTP 错误异常
1.1.0
2015-06-14 21:49 UTC
This package is not auto-updated.
Last update: 2024-09-28 17:21:30 UTC
README
特性
- HTTP 状态码
/** * @var \Exception $e */ $e->getCode(); // 502
- HTTP 状态文本
/** * @var \Exception $e */ $e->getMessage(); // Bad Gateway
- HTTP 错误说明
/** * @var \Exception $e */ $e->getExplanation(); // Indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
- HTTP 错误规范
/** * @var \Exception $e */ $e->getSpec(); // RFC7231#6.6.3
- HTTP 错误参考
/** * @var \Exception $e */ $e->getReference(); // http://tools.ietf.org/html/rfc7231#section-6.6.3
- HTTP 状态
/** * @var \Exception $e */ $e->getStatus() // 502 Bad Gateway