NNG_HTTP_REQ_DEL_HEADER(3http)
π nng_http_req_del_header β delete HTTP request header
okay bestie so this is from the NNG Reference Manual and it's literally the page about yeeting headers out of an HTTP request. stay with me, it's short and it slays π
β¨ NAME β¨
nng_http_req_del_header β delete HTTP request header
π¦ SYNOPSIS π¦
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
int nng_http_req_del_header(nng_http_req *req, const char *key);
πΈ DESCRIPTION πΈ
So like, the way that nng_http_req_del_header() works is: it removes all the HTTP headers that have the associated key from the request structure req. all of them. not just the first one you find. the whole squad, gone π
And the value of key? case insensitive. lowercase, uppercase, chaos-caps, doesn't matter. but β and this is the important part β it should not include the final colon in an HTTP header. for example, specifying Host or hOSt are equivalent, whereas the value Host: is not a legal header key. so like... don't do that π no colon, babe. the colon stays out of it. periodt.
π RETURN VALUES π
This function returns 0 on success, and non-zero otherwise. that's it, that's the vibe check β¨
π₯ ERRORS π₯
NNG_ENOENTβ no header with the keykeywas present. it looked. it found nothing. πNNG_ENOTSUPβ no support for HTTP in the library. like, the whole feature just isn't there, ngl.
π SEE ALSO π
nng_http_req_alloc(3http), nng_http_req_add_header(3http), nng_http_req_del_header(3http), nng_http_req_get_header(3http), nng(7)
(yes it links itself in SEE ALSO, and honestly? main character energy. we love a self-referential icon π )
so there you have it bestie β go forth and delete those headers π«Ά
sign-off szn: this lil masterpiece dropped 2026-01-13 as part of the NNG Reference Manual (NNG_HTTP_...DEL_HEADER(3http), for the record-keepers) β mwah, stan this manpage βπ§π
π¦ 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