diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-02-01 16:48:20 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-02-01 20:07:09 -0800 |
| commit | 5e5f814d63d4e00365b0ae726bc18831aa28e88f (patch) | |
| tree | 804a930d4f9f941cd75e156f169a52e7110ef1e9 /tests/httpclient.c | |
| parent | 3dae30ed5e543dc73fc993334ef56b9b157b9b3c (diff) | |
| download | nng-5e5f814d63d4e00365b0ae726bc18831aa28e88f.tar.gz nng-5e5f814d63d4e00365b0ae726bc18831aa28e88f.tar.bz2 nng-5e5f814d63d4e00365b0ae726bc18831aa28e88f.zip | |
fixes #174 Define public HTTP client API
Diffstat (limited to 'tests/httpclient.c')
| -rw-r--r-- | tests/httpclient.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/httpclient.c b/tests/httpclient.c index f26674f6..2438ab4c 100644 --- a/tests/httpclient.c +++ b/tests/httpclient.c @@ -17,7 +17,6 @@ // Basic HTTP client tests. #include "core/nng_impl.h" -#include "supplemental/http/http.h" #include "supplemental/sha1/sha1.h" const uint8_t utf8_sha1sum[20] = { 0x54, 0xf3, 0xb8, 0xbb, 0xfe, 0xda, 0x6f, @@ -31,7 +30,7 @@ TestMain("HTTP Client", { Convey("Given a TCP connection to httpbin.org", { nng_aio * aio; - nni_http_client *cli; + nng_http_client *cli; nng_http_conn * http; nng_url * url; @@ -39,13 +38,13 @@ TestMain("HTTP Client", { So(nng_url_parse(&url, "http://httpbin.org/encoding/utf8") == 0); - So(nni_http_client_init(&cli, url) == 0); - nni_http_client_connect(cli, aio); + So(nng_http_client_alloc(&cli, url) == 0); + nng_http_client_connect(cli, aio); nng_aio_wait(aio); So(nng_aio_result(aio) == 0); - http = nni_aio_get_output(aio, 0); + http = nng_aio_get_output(aio, 0); Reset({ - nni_http_client_fini(cli); + nng_http_client_free(cli); nng_http_conn_close(http); nng_aio_free(aio); nng_url_free(url); |
