#ifndef PHP_HTTP_REQUEST_API_H
#define PHP_HTTP_REQUEST_API_H
+#ifdef HTTP_HAVE_CURL
#include "php_http_std_defs.h"
#include "phpstr/phpstr.h"
void *data;
} http_curl_callback_ctx;
+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_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_global_init _http_request_global_init
-extern STATUS _http_request_global_init(void);
+#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);
#define http_request_method_name(m) _http_request_method_name((m) TSRMLS_CC)
PHP_HTTP_API const char *_http_request_method_name(http_request_method m TSRMLS_DC);
#define http_put(u, b, o, i, r) _http_request_ex(NULL, HTTP_PUT, (u), (b), (o), (i), (r) TSRMLS_CC)
#define http_put_ex(c, u, b, o, i, r) _http_request_ex((c), HTTP_PUT, (u), (b), (o), (i), (r) TSRMLS_CC)
+#endif
#endif
/*