+/* {{{ proto string HttpRequest::getRawRequestMessage()
+ *
+ * Get sent HTTP message.
+ *
+ * Returns an HttpMessage in a form of a string
+ */
+PHP_METHOD(HttpRequest, getRawRequestMessage)
+{
+ NO_ARGS;
+
+ if (return_value_used) {
+ getObject(http_request_object, obj);
+
+ RETURN_PHPSTR_DUP(&obj->request->conv.request);
+ }
+}
+/* }}} */
+
+/* {{{ proto string HttpRequest::getRawResponseMessage()
+ *
+ * Get the entire HTTP response.
+ *
+ * Returns the complete web server response, including the headers in a form of a string.
+ */
+PHP_METHOD(HttpRequest, getRawResponseMessage)
+{
+ NO_ARGS;
+
+ if (return_value_used) {
+ getObject(http_request_object, obj);
+
+ RETURN_PHPSTR_DUP(&obj->request->conv.response);
+ }
+}
+/* }}} */
+
+/* {{{ proto HttpMessage HttpRequest::getHistory()
+ *
+ * Get all sent requests and received responses as an HttpMessage object.
+ *
+ * If you want to record history, set the instance variable
+ * HttpRequest::$recordHistory to TRUE.
+ *
+ * Returns an HttpMessage object representing the complete request/response
+ * history.
+ *
+ * The object references the last received response, use HttpMessage::getParentMessage()
+ * to access the data of previously sent requests and received responses.
+ *
+ * Throws HttpRuntimeException.
+ */
+PHP_METHOD(HttpRequest, getHistory)
+{
+ NO_ARGS;
+
+ if (return_value_used) {
+ zval *hist;
+
+ SET_EH_THROW_HTTP();
+ hist = GET_PROP(history);
+ if (Z_TYPE_P(hist) == IS_OBJECT) {
+ RETVAL_OBJECT(hist, 1);
+ } else {
+ http_error(HE_WARNING, HTTP_E_RUNTIME, "The history is empty");
+ }
+ SET_EH_NORMAL();
+ }
+}
+/* }}} */
+
+/* {{{ proto void HttpRequest::clearHistory()
+ *
+ * Clear the history.
+ */
+PHP_METHOD(HttpRequest, clearHistory)
+{
+ NO_ARGS {
+ zval *hist;
+
+ MAKE_STD_ZVAL(hist);
+ ZVAL_NULL(hist);
+ SET_PROP(history, hist);
+ zval_ptr_dtor(&hist);
+ }
+}
+/* }}} */
+
+/* {{{ proto HttpMessage HttpRequest::send()