What to use for URL encoding?

Hi there,

I’m looking to correctly encode URLs. I’m coming from Python and R which have packages/libraries I’ve used to accomplish this, but I’m not seeing anything on Google. Can anyone please point me to a URL encoding Julia library?

Thank you!

3 Likes

Hello,

You should have a look to the print and show(..., ::MIME"text/html", ..) function in the uriparser package.

3 Likes

You can also use the more actively maintained HTTP.jl package, like:

HTTP. escapeuri(url)
HTTP. unescapeuri(url)
10 Likes

Ah, perfect! I’m already importing the HTTP package, so this’ll be super easy to use. No wonder I didn’t find the appropriate function (when it’s called “escapeuri” lol). Thank you for pointing those functions out!

3 Likes