- rs = http_post(uri, &body, Z_ARRVAL(options), NULL, NULL);
- } else
- if (!strcasecmp("GET", message->http.info.request.method)) {
- rs = http_get(uri, Z_ARRVAL(options), NULL, NULL);
- } else
- if (!strcasecmp("HEAD", message->http.info.request.method)) {
- rs = http_head(uri, Z_ARRVAL(options), NULL, NULL);
+
+ http_request_init_ex(&request, NULL, request.meth, uri);
+ request.body = &body;
+ if (SUCCESS == (rs = http_request_prepare(&request, NULL))) {
+ http_request_exec(&request);
+ }
+ http_request_dtor(&request);