title: undefined local variable or method `http' for main:Object Ruby
body: <p>I have a header and url as specified below:</p>
  
  <pre><code>header = { 'User-Agent' =&gt; 'SubDB/1.0 (Subtitle-Downloader /1.0; https://github.com/gautamsawhney/Subtitle-Downloader)' }
  url = "http://sandbox.thesubdb.com/?action=download&amp;hash=" + hash + "&amp;language=en"
  </code></pre>
  
  <p>I am try to send an <code>HTTP</code> get request using 
  <code>send_request</code> method in ruby. I am basically trying to access the SubDB API. I have written the following code to send a request :</p>
  
  <pre><code>res = http.send_request('GET', url, header)
  puts res.body
  </code></pre>
  
  <p>I have also done this <code>require net/http</code> , but I get this error </p>
  
  <pre><code>undefined local variable or method `http' for main:Object (NameError)
  </code></pre>
  
  <p>Can someone tell me what's wrong and if can I use any other method for the same? The inclusion of the header is necessary.</p>