title: HTTParty giving 401 using http basic authentication
body: <p>I have two applications. One contains an API (Rails) and the second (Sinatra) is a test application to check if the API is working correctly.
  In the test application I can get all of the information provided by my API using HTTParty. However, when I try to add http basic authentication in the API application, 
  the test application always gets a 401 error.</p>
  
  <p>In the controller which provides the API I have written </p>
  
  <pre><code>http_basic_authenticate_with name: "admin", password: "admin"
  </code></pre>
  
  <p>In my test application I have written</p>
  
  <pre><code>authenticate = {name: "admin", password: "admin"}
  options = {query: {username: params[:username], email: params[:email]}, 
           basic_auth: authenticate}
  response = HTTParty.get('http://localhost:3000/search.json', options)    
  </code></pre>
  
  <p>What am I doing wrong?</p>