+/* {{{ proto bool HttpRequest::enableCookies()
+ *
+ * Enable automatic sending of received cookies.
+ * Note that cuutomly set cookies will be sent anyway.
+ */
+PHP_METHOD(HttpRequest, enableCookies)
+{
+ NO_ARGS {
+ getObject(http_request_object, obj);
+ RETURN_SUCCESS(http_request_enable_cookies(obj->request));
+ }
+
+}
+/* }}} */
+
+/* {{{ proto bool HttpRequest::resetCookies([bool session_only = FALSE])
+ *
+ * Reset all automatically received/sent cookies.
+ * Note that customly set cookies are not affected.
+ *
+ * Accepts an optional bool parameter specifying
+ * whether only session cookies should be reset
+ * (needs libcurl >= v7.15.4, else libcurl >= v7.14.1).
+ *
+ * Returns TRUE on success, or FALSE on failure.
+ */
+PHP_METHOD(HttpRequest, resetCookies)
+{
+ zend_bool session_only = 0;
+ getObject(http_request_object, obj);
+
+ if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &session_only)) {
+ RETURN_FALSE;
+ }
+ RETURN_SUCCESS(http_request_reset_cookies(obj->request, session_only));
+}
+/* }}} */
+