NNG_HTTP_REQ_GET_URI(3http)

πŸ“¦ version 1.11, in alpine 3.24

πŸ’– NAME πŸ’–

nng_http_req_get_uri β€” bestie, this is the one that just hands you the URI of an HTTP request. Like, it returns it. That's the whole job. Slay.


✨ SYNOPSIS ✨

so first you gotta include the girlies:

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

const char *nng_http_req_get_uri(nng_http_req *req);
🫢 oh and hey β€” this is from the NNG Reference Manual, page nng_http_req_get_uri(3http). Just so you know where we are. iykyk.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so the way that nng_http_req_get_uri() works is it returns the URI (that's the path, bestie) associated with the HTTP request req.

And ngl it's not just the path β€” the value you get back includes the path, plus any query information, plus any fragment. The whole package. Main character energy.

So it'll end up looking like a file system path with those optional lil components tacked on the end, like this:

/api/get_info.cgi?name=garrett

literally iconic. that's the vibe. πŸ’…


πŸŽ€ RETURN VALUES πŸŽ€

  • The request URI, as a string. That's it, that's the tea. ✨

🌸 ERRORS 🌸

  • None. 😭 not a single one. zero errors. we love a low-drama function. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’€ okay go read the others too, bestie β€” nng_http_req_set_uri(3http) is literally the other half of this situation and you're gonna need it fr fr.

mwah πŸ’‹ that's the whole page β€” brought to you by the NNG Reference Manual, dated 2026-01-13. nng_http_req_get_uri(3http) out! πŸ¦‹βœ¨

πŸ“¦ where this page comes from