title: Golang http Get empty response.Body
body: <p>I am running into a problem that for certain urls, code in Golang is not retrieving the expected content. I am not posting the actual url, but it has this form and is a link to a google drive file download <code>https://docs.google.com/uc?id=somelongid&amp;export=download</code>. If I use wget to get the file it works fine. I also have ruby code which uses <code>open()</code> and it works as well. For some reason though Golang returns an empty buffer and no error. If I use this code to fetch some "ordinary" url like a static website it works as expected and returns non-empty response.Body. Below is code I extracted out of my project to simplify and narrow where the problem could be. Below is output.</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "io/ioutil"
      "net/http"
  )
  
  func main() {
      resp, err := http.Get("myurlishere")
      if err != nil {
          fmt.Println("Something went wrong")
      }
      defer resp.Body.Close()
      body, err := ioutil.ReadAll(resp.Body)
      fmt.Printf("Body: %v\n", body)
      fmt.Printf("Error: %v\n", err)
  }
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>$go run main.go
  Body: []
  Error: &lt;nil&gt;
  </code></pre>