-#define http_request_copystr(s) _http_request_copystr((s) TSRMLS_CC)
-PHP_HTTP_API char *_http_request_copystr(const char *string TSRMLS_DC);
+typedef struct {
+ phpstr *response;
+ phpstr *request;
+ curl_infotype last_info;
+} http_curl_conv;
+
+#define COPY_STRING 1
+#define COPY_SLIST 2
+#define COPY_CONTEXT 3
+#define COPY_CONV 4
+#define http_request_data_copy(type, data) _http_request_data_copy((type), (data) TSRMLS_CC)
+extern void *_http_request_data_copy(int type, void *data TSRMLS_DC);
+#define http_request_data_free_string _http_request_data_free_string
+extern void _http_request_data_free_string(void *string);
+#define http_request_data_free_slist _http_request_data_free_slist
+extern void _http_request_data_free_slist(void *list);
+#define http_request_data_free_context _http_request_data_free_context
+extern void _http_request_data_free_context(void *context);
+#define http_request_data_free_conv _http_request_data_free_conv
+extern void _http_request_data_free_conv(void *conv);
+
+#define http_request_conv(ch, rs, rq) _http_request_conv((ch), (rs), (rq) TSRMLS_CC)
+extern void _http_request_conv(CURL *ch, phpstr* response, phpstr *request TSRMLS_DC);