- void ***tsrm_ctx;
- void *data;
-} http_request_callback_ctx;
-
-typedef struct {
- phpstr *response;
- phpstr *request;
- curl_infotype last_info;
-} http_request_conv;
-
-#define HTTP_REQUEST_CALLBACK_DATA(from, type, var) \
- http_request_callback_ctx *__CTX = (http_request_callback_ctx *) (from); \
- TSRMLS_FETCH_FROM_CTX(__CTX->tsrm_ctx); \
- type (var) = (type) (__CTX->data)
-
-#define http_request_callback_data(data) _http_request_callback_data_ex((data), 1 TSRMLS_CC)
-#define http_request_callback_data_ex(data, copy) _http_request_callback_data_ex((data), (copy) TSRMLS_CC)
-extern http_request_callback_ctx *_http_request_callback_data_ex(void *data, zend_bool cpy TSRMLS_DC);
-
-
-#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);
+ CURL *ch;
+ char *url;
+ http_request_method meth;
+ http_request_body *body;
+
+ struct {
+ curl_infotype last_type;
+ phpstr request;
+ phpstr response;
+ } conv;
+
+ struct {
+ phpstr cookies;
+ HashTable options;
+ struct curl_slist *headers;
+ } _cache;
+
+ char _error[CURL_ERROR_SIZE+1];
+ zval *_progress_callback;
+
+#ifdef ZTS
+ void ***tsrm_ls;
+#endif