This is intended less as the suggested implementation (it simply follows the existing encoded_of_path one), but as a starting point for a discussion to include such function.
Its addition is motivated by several things:
To make .path interface similar to that of .query, which has both the encoded (verbatim) and the unencoded (default) version
To avoid unnecessary encoding->decoding that is required now to obtain an unencoded path like: Uri.path x |> Uri.pct_decode
It seems to be hard to achieve this through the existing interface of path ?pct_encoder, since the encoder relies on the list of safe characters - makes little sense to create a whitelist of all characters for this.
This is intended less as the suggested implementation (it simply follows the existing
encoded_of_path
one), but as a starting point for a discussion to include such function.Its addition is motivated by several things:
.path
interface similar to that of.query
, which has both the encoded (verbatim) and the unencoded (default) versionUri.path x |> Uri.pct_decode
path ?pct_encoder
, since the encoder relies on the list of safe characters - makes little sense to create a whitelist of all characters for this.