# Help with HTTPoison POST

**URL:** <https://forum.elixirforum.com/t/help-with-httpoison-post/11315>\
**Category:** Questions\
**Tags:** troubleshooting\
**Created:** [January 5, 2018, 4:19am UTC](https://forum.elixirforum.com/t/help-with-httpoison-post/11315 "2018-01-05T04:19:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Aetherus](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/aetherus/32/17203_2.png) [@Aetherus](https://forum.elixirforum.com/u/Aetherus)\
**Post date:** [January 6, 2018, 1:17am UTC](https://forum.elixirforum.com/t/help-with-httpoison-post/11315/4 "2018-01-06T01:17:37Z")

</div>

According to your curl example, the request should be sent with “application/x-www-form-urlencoded” format. You can try `URI.encode_query/1` to encode a map or a keyword list to that format, for example,

```elixir
req_body = URI.encode_query(%{"name" => "who am i", "pass" => "$3cret"})
HTTPoison.post(
  "http://www.example.com/login",
  req_body,
  %{"Content-Type" => "application/x-www-form-urlencoded"}
)

```

---

_[View the full topic](https://forum.elixirforum.com/t/help-with-httpoison-post/11315)._
