benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

add new url format for unix socket #653

Open benoitc opened 4 years ago

benoitc commented 4 years ago

Current way to pass the socket requires the user to url encode the path. For example /var/run/mysocketshould be encoded as %2Fvar%2Frun%2Fmyscoket which is not really convenient.

Changes:

We introduce thiss tuple as a ne format {<<"unix:/var/run/mysock'>>,<<"http://path/to/resource"> }

This allows the user to pass a path withut encoding it while supporting extensions in the future.

note: for now only http is suppored.