title: HTTP-posting data via grunt
body: <p>I try to http-post a file via grunt to a specified URL. I try to achieve that by getting the content of the file in the body, which then is extracted by the server (the server part is given and works). Here's the relevant snippet of my Gruntfile:</p>
  
  <pre><code>http: {
    local: {
      options: {
        url: 'http://0.0.0.0:8765/root/js',
        method: 'POST',
        headers: {
          'Content-Type': 'text/javascript'
        },
        body: function () {
          return grunt.file.read(path.join(__dirname, 'dist', 'usher.min.js'));
        },
        encoding: 'utf8',
        auth: {
          user: '&lt;%= httpauth.HTTPUser %&gt;',
          pass: '&lt;%= httpauth.HTTPPass %&gt;'
        }
      }
    }
  }
  </code></pre>
  
  <p>The backend does not recieve anything, wireshark says that the body sent is empty. The file ./dist/usher.min.js exists. What am I doing wrong?</p>
  
  <p>UPDATE: As you might assume, I am using <a href="https://www.npmjs.org/package/grunt-http" rel="nofollow">https://www.npmjs.org/package/grunt-http</a>, version 1.4.1</p>