title: Faraday not connecting to url
body: <p>My problem is - Faraday can't connect to url. when i open it in browser <code>http://localhost:3001/api/plans</code> i get response.<br>
  but when i try to connect from rails i get response status 405 and empty response body  </p>
  
  <pre><code>  url = 'http://localhost:3001/api/plans'
    conn = Faraday.new(:url =&gt; url) do |faraday|
      faraday.request  :url_encoded             # form-encode POST params
      faraday.response :logger                  # log requests to STDOUT
      faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
    end
    resp = conn.post do |req|
      req.headers['Content-Type'] = 'application/json'
      req.body = data.to_json
    end
    logger.info '**********************************'
    logger.debug "* Login params: #{data.inspect}"
    logger.debug "* Url: #{url} "
    logger.debug "* Response: #{resp.inspect} "
    logger.debug "* Response body: #{resp.body.inspect} "
    logger.info '**********************************'
  </code></pre>
  
  <p>output of logger is:  </p>
  
  <pre><code>**********************************
  * Login params: {:username=&gt;"14122460670", :password=&gt;"******", :remember_me=&gt;"on"}
  * Url: http://localhost:3001/api/plans 
  * Response: #&lt;Faraday::Response:0x007f9f5c467528 @env={:method=&gt;:post, :body=&gt;"", :url=&gt;#&lt;URI::HTTP:0x007f9f480da450 URL:http://localhost:3001/v1/sessions&gt;, :request_headers=&gt;{"User-Agent"=&gt;"Faraday v0.8.7", "Content-Type"=&gt;"application/json"}, :parallel_manager=&gt;nil, :request=&gt;{:proxy=&gt;nil}, :ssl=&gt;{}, :status=&gt;405, :response_headers=&gt;{"allow"=&gt;"OPTIONS, GET, HEAD", "content-type"=&gt;"text/plain", "connection"=&gt;"close", "server"=&gt;"thin 1.5.1 codename Straight Razor"}, :response=&gt;#&lt;Faraday::Response:0x007f9f5c467528 ...&gt;}, @on_complete_callbacks=[]&gt; 
  * Response body: "" 
  **********************************  
  </code></pre>
  
  <p>Why i can't get a response using Faraday and how may i get it?</p>