Background
In case you are not aware, HTTPoison
is a http client library for Elixir (Like
requests
in python) I need to pass an auth_token
as a query param for every
API call.
Unfortunately, (as of april 2020) the documentation was not clear enough.
Documentation of this function redirects to
HTTPoison.Request which
does mention :params
as
:params - Query parameters as a map, keyword, or orddict
Even the example uses only first 4 of the 5 parameters 😀
Google search also did not help much, until I stumbled upon this line in one of the HTTPoison's PR which I found via one of the searches.
Solution
Send in params
as part of options like :
|
|