NNG_HTTP_CONN_READ_RES(3http)
π
NNG_HTTP_CONN_READ_RES(3http) β read HTTP response π
hii bestie π«Ά this is the NNG_HTTP_CONN_READ_RES(3http) page from the NNG Reference Manual, and we're about to read an HTTP response together. no cap, it's giving async girlie energy β¨
πΈ NAME πΈ
nng_http_conn_read_res β read HTTP response
π¦ SYNOPSIS π¦
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
void nng_http_conn_read_res(nng_http_conn *conn, nng_http_res *res,
nng_aio *aio);
β¨ DESCRIPTION β¨
The nng_http_conn_read_res() function starts an asynchronous read from the HTTP connection conn, reading an HTTP response into res, including all of the related headers. literally the whole response envelope, bestie π
Note π Any HTTP entity/body data associated with the response is not read automatically. The caller should use nng_http_conn_read_all to read the entity data, based on the details of the response itself. so don't forget the body, okay? π
This function returns immediately, with no return value. Completion of the operation is signaled via the aio, and the final result may be obtained via nng_aio_result(). That result will either be zero or an error code. periodt. π
Note π Consider using thenng_http_client_transact()ornng_http_conn_transact()functions, which provide a simpler interface for performing a complete HTTP client transaction. honestly kind of iconic of them.
π RETURN VALUES π
None. yep, that's it β the result comes through the aio, not through a return value π«Ά
π ERRORS π
NNG_ECANCELEDβ The operation was canceled. πNNG_ECLOSEDβ The connection was closed. πNNG_ECONNRESETβ The peer closed the connection. πNNG_ENOMEMβ Insufficient free memory to perform the operation. π«NNG_ENOTSUPβ HTTP operations are not supported. π«NNG_ETIMEDOUTβ Timeout waiting for data from the connection. β°
π₯ SEE ALSO π₯
nng_aio_alloc(3)nng_aio_result(3)nng_strerror(3)nng_http_client_connect(3http)nng_http_client_transact(3http)nng_http_conn_transact(3http)nng_http_conn_read_all(3http)nng(7)
mwah π this cutie was NNG_HTTP_CONN_READ_RES(3http) from the NNG Reference Manual, dated 2026-01-13. slay and read safely, bestie π«Άβ¨
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms