It returns error because you are passing an Elixir String / Binary, while it is an Erlang function expecting argument which is Charlist.
These two types are not directly compatible and you have to convert between these two often when using Erlang libraries from Elixir. Generally charlists literals will be wrapped in single quotes ’ and binaries with double quotes ". You can convert between these with to_charlist and to_string functions that are imported by default everywhere.
So, your example will work if you use single quotes and skip https:// which is a protocol. You should write:
Awesome, it works - yeah the problem was string instead of charlist. Looks like I need to improve my Erlang knowledge… Thanks @l00ker, @Marcus, @hubertlepicki !