NNG_HTTP_RES_GET_REASON(3http)
π nng_http_res_get_reason β return HTTP response reason
okay bestie, welcome to the NNG Reference Manual, section 3http π¦ β today's main character is nng_http_res_get_reason, and honestly? she's lowkey the easiest function in the whole HTTP family. no cap.
β¨ SYNOPSIS β¨
like, just include these two things first, mwah π
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
const char *nng_http_res_get_reason(nng_http_res *res);
πΈ DESCRIPTION πΈ
so the way that nng_http_res_get_reason() works is it hands you back a string β like, an actual string β that represents the reason associated with the response res π.
and what even is a reason, you ask? it's the human-readable explanation of the status code that you would get from nng_http_res_get_status(). that's a mouthful but it's literally just the cute little text next to the number, y'know? the vibe check that comes with the code π«Ά iykyk.
π RETURN VALUES π
Reason as a string. that's it. that's the whole section. slay π
π ERRORS π
None.
not me having nothing to report π like literally zero errors, she simply cannot fail. iconic behaviour fr fr β¨
π SEE ALSO π
go read those next, bestie, they're the friend group of this function and they all ate π₯
okay that's the whole page, 2026-01-13 energy, brought to you by the NNG Reference Manual and this NNG_HTTP_...GET_REASON(3http) header up top π§π bye bye, go get that reason string β
π¦ 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