title: Coffeescript HTTP client
body: <p>I am running <code>server.coffee</code> from this page: <a href="https://github.com/xenph/foaas" rel="nofollow">https://github.com/xenph/foaas</a></p>
  
  <p>From the command line, you can do:</p>
  
  <pre><code>curl http://localhost:5000/off/Name1/Name2
  !@#$ off, Name1. - Name2
  </code></pre>
  
  <p>But I'm using the code from this page: <a href="http://coffeescriptcookbook.com/chapters/networking/basic-http-client" rel="nofollow">http://coffeescriptcookbook.com/chapters/networking/basic-http-client</a></p>
  
  <pre><code>http = require 'http'
  
  http.get { host: 'http://localhost:5000/off/Name1/Name2' }, (res) -&gt;
      data = ''
      res.on 'data', (chunk) -&gt;
          data += chunk.toString()
      res.on 'end', () -&gt;
          console.log data
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>events.js:72
          throw er; // Unhandled 'error' event
                ^
  Error: getaddrinfo ENOTFOUND
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)
  </code></pre>
  
  <p>Which leads me to believe that it's not finding the url.</p>
  
  <p>What can I do?</p>