title: Fetch API yields "TypeError: failed to fetch"
body: <p>I am on Chrome, and I see this bizarre error: </p>
  
  <pre><code>TypeError: failed to fetch
  </code></pre>
  
  <p><strong>(yes, that is the whole error message).</strong></p>
  
  <p>Here is the code that generated the error:</p>
  
  <pre><code>fetch(logoUrl, {
      method: 'put',
      headers: {
        'Content-Type': 'image/jpeg',
        //encode credentials as base64
        'Authorization': 'Basic ' + btoa('cdt-deployer:xyz'),
      },
      body: imgFile // the file
  
    }).catch(function(err){
         // the error appears here
    })
  </code></pre>
  
  <p>what am I supposed to do? I have no idea what's wrong. I am simply trying to send a binary image file to another server (I cannot see the server logs).</p>