NNG_HTTP_CONN_READ_RES(3http)

πŸ“¦ version 1.11, in alpine 3.24

πŸ’… 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 the nng_http_client_transact() or nng_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 πŸ”₯


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