+ * Get the response code after the request has been sent.
+ */
+PHP_METHOD(HTTPi_Request, getResponseCode)
+{
+ zval **code, **hdrs, *data;
+ getObject(httpi_request_object, obj);
+
+ NO_ARGS;
+
+ data = GET_PROP(obj, responseData);
+ if ( (SUCCESS == zend_hash_find(Z_ARRVAL_P(data), "headers", sizeof("headers"), (void **) &hdrs)) &&
+ (SUCCESS == zend_hash_find(Z_ARRVAL_PP(hdrs), "Status", sizeof("Status"), (void **) &code))) {
+ RETVAL_STRINGL(Z_STRVAL_PP(code), Z_STRLEN_PP(code), 1);
+ convert_to_long(return_value);
+ } else {
+ RETURN_FALSE;
+ }
+}
+/* }}} */
+
+/* {{{ proto array HTTPi_Request::getResponseInfo([string name])
+ *
+ * Get response info after the request has been sent.