title: How to transform CURL request to Httpoison request in Elixir Phoenix
body: <p>I'm trying to transform CURL request with HTTPoison in Elixir Phoenix.
  When I run CURL request commend, It work fine.I got "415 Unsupported media type" error when I try with HTTPoison.</p>
  
  <p><a href="https://stackoverflow.com/questions/46981804/phoenix-elixir-curl-works-but-httpoison-fails">Phoenix/Elixir - cURL works, but HTTPoison fails</a></p>
  
  <p>Here is my CURL request</p>
  
  <pre><code>curl -u "user:password" -i -H "Accept:application/json" -X POST -d
   "amount=100&amp;method=0&amp;type=bank&amp;receiver=CCC&amp;info1=hello" 
   http://00.000.000.00:8080/services/id/999999111999/calculate
  </code></pre>
  
  <p>Here is my Httpoison request</p>
  
  <pre><code>url = "myurl"
  orderid = "myorderid"
  headers = ["Accept", "application/json"]
  request_body = '{"type" : "bank", 
           "method" : 0,
           "amount" : #{amount},
                   "receiver" : "CCC"
           "info1" : #{orderid}}'
  dicoba = HTTPoison.post(url, headers, request_body, hackney: [basic_auth: {"#{user}", "#password"}]) |&gt; IO.inspect
  </code></pre>