http_uri(3)
β¨ NAME β¨
okay so bestie, this is http_uri β it's the old URI utility module, and the whole point of this page is: use uri_string instead. that's it, that's the tea π
πΈ DESCRIPTION πΈ
ngl this module is deprecated since OTP 23. like, it's giving "retired icon living her best life". the move is to use the module uri_string to properly handle URIs β that's the recommended one and it's been the moment since OTP 21. so if you're starting something new, uri_string is the main character and http_uri is the nostalgic cameo π«Ά
π Data types
here's the type definitions that are related to URI:
uri_part()=[byte()] | binary()β syntax according to the URI definition in RFC 3986, for example,"http://www.erlang.org/". so yeah, a list of bytes OR a binary, your choice, slay β¨
for more info about URI, see RFC 3986. iykyk, it's the source of truth π
π₯ FUNCTIONS π₯
decode(QuotedData) -> Data
when:
QuotedData :: unicode:chardata()Data :: unicode:chardata()
Deprecated:http_uri:decode/1is deprecated; useuri_string:unquotefunction instead π
it decodes a possibly percent encoded URI part. so like, %20 comes in, a space comes out, glow-up complete π¦
WARNING: Use uri_string:unquote/1 instead. fr fr, don't come for this one π
encode(Data) -> QuotedData
when:
Data :: unicode:chardata()QuotedData :: unicode:chardata()
Deprecated:http_uri:encode/1is deprecated; useuri_string:quotefunction instead π
it performs percent encoding. so a space goes in, %20 comes out, literally the reverse makeover π
WARNING: Useuri_string:quote/1instead. bestie i'm begging you,uri_stringis right there π
okay that's the whole page, mwah π this one came from Ericsson AB, it's part of inets 9.7.2, and yeah it's http_uri(3) β deprecated queen, we still love her, but go use uri_string instead ππβ¨
π¦ 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