if (obj->message->parent) {
RETVAL_OBJVAL(obj->parent, 1);
} else {
- http_error(HE_WARNING, HTTP_E_MESSAGE, "HttpMessage does not have a parent message");
+ http_error(HE_WARNING, HTTP_E_RUNTIME, "HttpMessage does not have a parent message");
}
}
SET_EH_NORMAL();
* to access the data of previously received responses within this request
* cycle.
*
- * Throws HttpException.
+ * Throws HttpException, HttpRuntimeException.
*/
PHP_METHOD(HttpRequest, getResponseMessage)
{
- NO_ARGS;
-
- IF_RETVAL_USED {
+ NO_ARGS {
zval *message;
SET_EH_THROW_HTTP();
if (Z_TYPE_P(message) == IS_OBJECT) {
RETVAL_OBJECT(message, 1);
} else {
- RETVAL_NULL();
+ http_error(HE_WARNING, HTTP_E_RUNTIME, "HttpRequest does not contain a response message");
}
SET_EH_NORMAL();
}
* Get sent HTTP message.
*
* Returns an HttpMessage in a form of a string
- *
*/
PHP_METHOD(HttpRequest, getRawRequestMessage)
{
* Get the entire HTTP response.
*
* Returns the complete web server response, including the headers in a form of a string.
- *
*/
PHP_METHOD(HttpRequest, getRawResponseMessage)
{