httpd_custom_api(3erl)

πŸ¦‹ httpd_custom_api(3erl) πŸ¦‹

okay so bestie, welcome to httpd_custom_api(3erl) β€” an Erlang Module Definition from the inets manual. This is literally the behaviour with optional callbacks that lets you customize the inets HTTP server. πŸ’–

✨ NAME ✨

httpd_custom_api β€” behaviour with optional callbacks to customize the inets HTTP server. πŸŽ€

🌸 DESCRIPTION 🌸

The module implementing this behaviour shall be supplied to the servers configuration with the option customize. That’s the hookup, iykyk. 🫢

πŸ”₯ EXPORTS πŸ”₯

πŸ’… response_default_headers() -> [Header]

Types:

Header = {HeaderName :: string(), HeaderValue::string()}
  string:to_lower/1 will be performed on the HeaderName

Provide default headers for the HTTP servers responses. ⚠️ Note that this option may override built-in defaults. Slay, but carefully.

πŸ¦‹ response_header({HeaderName, HeaderValue}) -> {true, Header} | false

Types:

Header = {HeaderName :: string(), HeaderValue::string()}
  The header name will be in lower case and should not be altered.

Filter and possibly alter HTTP response headers before they are sent to the client. yes bestie, before they hit the client. πŸ’–

🧚 request_header({HeaderName, HeaderValue}) -> {true, Header} | false

Types:

Header = {HeaderName :: string(), HeaderValue::string()}
  The header name will be in lower case and should not be altered.

Filter and possibly alter HTTP request headers before they are processed by the server. iconic pre-processing energy. ⭐


shoutout to Ericsson AB, inets 8.3.1.2, and httpd_custom_api(3erl) β€” that’s the footer energy, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from