NNG_HTTP_REQ_GET_DATA(3http)

πŸ“¦ version 1.11, in alpine 3.24

okay bestie, welcome to the NNG_HTTP_REQ_GET_DATA(3http) page from the NNG Reference Manual β€” we’re getting an HTTP request body and we’re gonna slay it πŸ’–βœ¨

πŸ’– NAME πŸ’–

nng_http_req_get_data β€” get HTTP request body πŸ‘‘

✨ SYNOPSIS ✨

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

void nng_http_req_get_data(nng_http_req *req, void **bodyp, size_t *sizep);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so nng_http_req_get_data() gets the HTTP body associated with the request req, storing a pointer to the buffer at the location referenced by bodyp, and the length of the associated buffer at the location referenced by sizep. literally that’s the whole vibe 🫢

πŸ“ Note: the buffer returned is owned by req, and will automatically freed when the request is freed. so yeah, do not free it yourself, bestie β€” the request has main character energy and handles its own cleanup πŸ’…

πŸŽ€ RETURN VALUES πŸŽ€

None. like, none none β€” nothing comes back 😌

🌸 ERRORS 🌸

None. no error codes, no drama, no cap 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

go peek at those if you want the full friend-group lore πŸ¦‹πŸ’œ


xoxo, this cutie came from the NNG Reference Manual, dated 2026-01-13 πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from