NNG_HTTP_RES_FREE(3http)

πŸ“¦ version 1.11, in alpine 3.24

✨ NNG_HTTP_RES_FREE(3http) ✨

okay so this is a page from the NNG Reference Manual (yes, that NNG, the nng(7) one, hi bestie 🫢) and it's a tiny one but it's important so stay with me.

🌸 NAME 🌸

nng_http_res_free β€” frees an HTTP response structure. that's it. that's the whole job. she's a one-task icon πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

#include <nng/nng.h>
#include <nng/supplemental/http/http.h>

void nng_http_res_free(nng_http_res *req);
ngl the parameter is literally spelled req in the synopsis even though this whole page is about a response β€” i'm not touching it, we keep it exactly as written, no cap πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

so nng_http_res_free() deallocates the HTTP response structure res entirely. like, gone gone. not "reset", not "reused", fully deallocated. main character exit, periodt πŸ”₯

Tip πŸ’‘ Instead of freeing and reallocating response structures, it is possible to reuse res with nng_http_res_reset(). lowkey a glow-up move β€” recycle instead of rebuild, the planet and your allocator both say thank you 🌈

⭐ RETURN VALUES ⭐

None. nothing. void. she returns nothing and she's thriving 🧚

πŸ’œ ERRORS πŸ’œ

None. zero errors, zero drama. we love a peaceful function 😌

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page bestie, go forth and free your responses responsibly πŸ’–

signed off with love from the NNG Reference Manual, dated 2026-01-13 β€” NNG_HTTP_RES_FREE(3http), mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from