title: POST over HTTPS Ruby on Rails
body: <p>I need to call an external url to pull down some information from a remote database. </p>
  
  <p>I tried setting up my call like this:</p>
  
  <pre><code>post_params = {'a' =&gt; 'b', 'b' =&gt; 'c',}
  resp = Net::HTTP.post_form(URI.parse('https:/my.remoteserver.com/'), post_params)
  </code></pre>
  
  <p>This returns with a 400 Bad Request, however, due to the fact that the url is HTTPS.</p>
  
  <p>If I format the call as a GET, however, and do something like this:</p>
  
  <pre><code>url = URI.parse("https:/my.remoteserver.com?a=b&amp;b=c")
  result = Net::HTTP.start(url.host, use_ssl: true, verify_mode: OpenSSL::SSL::VERIFY_NONE) do
    |http| http.get url.request_uri, 'User-Agent' =&gt; 'MyLib v1.2'
  end
  </code></pre>
  
  <p>Everything works fine. Unfortunately in my specific case I can't use GET. I assume there is a way to do this over POST but I just don't know what that would be. If anyone could help me out with this I'd really appreciate it. Thanks!</p>