httpotion elixir

Httpotion’s documentation is better than Httpoison, so that’s why I use Httpotion. IF YOUR DOCU SUCKS ASS I WONT USE YOUR STUFF.

response = HTTPotion.get ",2,3,4", [headers: ["Content-Type": "application/json", "Authorization": "Bearer #{my_token}"]]

response = "", [body: "{'channel': '#general', 'username': 'derp', 'text': 'Pokemon are scary!', 'icon_emoji': ':ghost:'}", headers: ["Content-Type": "application/json"]]


accessing the information… the internet says, who the fuck would want that?

Again in disbelief of how this is possible, but the internet doesn’t want you to know about this function..

derp = response |> Map.get(:body) |> Poison.decode
{:ok, derp2} = derp

Post Content