Open jeramyRR opened 8 years ago
This should encode properly if you do it like
HTTPoison.get(
"http://api.openweathermap.org/data/2.5/weather",
[],
params: %{q: "London, UK"}
)
@ryanwinchester this doesn't solve the case when HTTPoison follows a redirect with an URL with spaces in Location header. This issue seems simple to solve but it's open for 2 years. Also, there's a pull request open that resolves this issue since 2016. Can I do something to help?
Thanks @ryanwinchester . Your solution worked well for me.
Spaces in a url string should be converted to %20 when calling HTTPoison.get, but it appears that this is not happening.
example: HTTPoison.get "http://api.openweathermap.org/data/2.5/weather?q=London, UK" should convert url to: http://api.openweathermap.org/data/2.5/weather?q=London,%20UK