title: How to perform the following curl request using the ruby Faraday gem?
body: <p>This is the curl request I'd like to perform:</p>
  
  <p><code>curl --request GET --url 'https://us8.api.mailchimp.com/3.0/' --user 'anystring:&lt;apikey&gt;'</code></p>
  
  <p>Running this curl command from the command line, I get a bunch of JSON, which is what I want.</p>
  
  <p>I'm trying to perform this same request using Faraday. This is what I've tried:</p>
  
  <pre><code>conn = Faraday.new "https://us8.api.mailchimp.com/3.0/" do |faraday|
    faraday.adapter Faraday.default_adapter
  end
  conn.basic_auth('apikey', &lt;apikey&gt;)
  
  response = conn.get
  
  puts response.body # =&gt; "&lt;!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"&gt;\n&lt;html&gt;&lt;head&gt;\n&lt;title&gt;301 Moved Permanently&lt;/title&gt;\n&lt;/head&gt;...
  </code></pre>
  
  <p>How do I get JSON instead of the html I'm seeing in <code>response.body</code>?</p>