aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http/http_public.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/supplemental/http/http_public.c')
-rw-r--r--src/supplemental/http/http_public.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c
index f275db28..84811e54 100644
--- a/src/supplemental/http/http_public.c
+++ b/src/supplemental/http/http_public.c
@@ -226,6 +226,30 @@ nng_http_res_set_data(nng_http_res *res, const void *data, size_t sz)
#endif
}
+void
+nng_http_req_get_data(nng_http_req *req, void **datap, size_t *lenp)
+{
+#ifdef NNG_SUPP_HTTP
+ nni_http_req_get_data(req, datap, lenp);
+#else
+ NNI_ARG_UNUSED(req);
+ *datap = NULL;
+ *lenp = 0;
+#endif
+}
+
+void
+nng_http_res_get_data(nng_http_res *res, void **datap, size_t *lenp)
+{
+#ifdef NNG_SUPP_HTTP
+ nni_http_res_get_data(res, datap, lenp);
+#else
+ NNI_ARG_UNUSED(res);
+ *datap = NULL;
+ *lenp = 0;
+#endif
+}
+
const char *
nng_http_req_get_method(nng_http_req *req)
{
@@ -811,3 +835,35 @@ nng_http_client_connect(nng_http_client *cli, nng_aio *aio)
}
#endif
}
+
+void
+nng_http_client_transact(
+ nng_http_client *cli, nng_http_req *req, nng_http_res *res, nng_aio *aio)
+{
+#ifdef NNG_SUPP_HTTP
+ nni_http_transact(cli, req, res, aio);
+#else
+ NNI_ARG_UNUSED(cli);
+ NNI_ARG_UNUSED(req);
+ NNI_ARG_UNUSED(res);
+ if (nni_aio_begin(aio) == 0) {
+ nni_aio_finish_error(aio, NNG_ENOTSUP);
+ }
+#endif
+}
+
+void
+nng_http_conn_transact(
+ nng_http_conn *conn, nng_http_req *req, nng_http_res *res, nng_aio *aio)
+{
+#ifdef NNG_SUPP_HTTP
+ nni_http_transact_conn(conn, req, res, aio);
+#else
+ NNI_ARG_UNUSED(conn);
+ NNI_ARG_UNUSED(req);
+ NNI_ARG_UNUSED(res);
+ if (nni_aio_begin(aio) == 0) {
+ nni_aio_finish_error(aio, NNG_ENOTSUP);
+ }
+#endif
+}