httpd_custom_api(3)
β¨ httpd_custom_api β¨
okay bestie, welcome to httpd_custom_api β it's a module page from the inets docs (section 3 of the manual, for all my manpage girlies π
). this one's a behaviour, and it's literally the glow-up kit for the inets HTTP server π
π¦ NAME π¦
httpd_custom_api β a behaviour with optional callbacks that let you customize the inets HTTP server. yes, optional β you pick and choose, no pressure, we love a flexible icon π
πΈ DESCRIPTION πΈ
The module that implements this behaviour has to be handed over to the server's configuration, and you do that with the option customize.
that's it, that's the whole vibe check β you write a module, you wire it in with customize, and the server starts asking your code for opinions. main character energy fr fr π
π CALLBACKS π
π request_header/1
Filter and possibly alter the HTTP request headers before the server processes them.
so likeβ¦ the request headers show up to the party, and you get to check their fit in the doorway. keep them, tweak them, whatever β just know the server sees whatever you hand back π«Ά
π response_default_headers()
Provide default headers for the HTTP server's responses.
heads up bestie: this one may override the built-in defaults. the server already has opinions, and yours win. know that before you go changing things π
π response_header/1
Filter and possibly alter the HTTP response headers before they get sent to the client.
last stop before the door, and you're the bouncer. the client only ever sees the version you approve β¨
and that's the whole page, no cap. all three callbacks are optional, all three are iconic, and the module doing the implementing just needs to be plugged in via customize.
mwah π thanks for reading, sending you the biggest hug π«Ά
β brought to you by Ericsson AB, straight out of inets 9.7.2. go slay some headers, queen ππΊ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms