title: How to read file content from an http.Request's response
body: <p>I use below code to send a request to an http server.</p>
  
  <p>The server sends a response that contains those http headers </p>
  
  <pre><code>Content-Disposition:[attachment;filename=somefilename.csv] 
  Content-Type:[text/csv; charset=UTF-8]
  </code></pre>
  
  <p>How do i proceed to retrieve the content of the file attached with the response ?</p>
  
  <pre><code>baseUrl := "Some url that i call to fetch csv file"
  
  client := http.Client{}
  
  resp, _ := client.Get(baseUrl)
  defer resp.Body.Close()
  
  fmt.Println(resp)
  
  // &amp;{200 OK 200 HTTP/2.0 2 0 map[Content-Disposition:[attachment;filename=somefilename.csv] Content-Type:[text/csv; charset=UTF-8] Date:[Mon, 30 Sep 2019 09:54:08 GMT] Server:[Jetty(9.2.z-SNAPSHOT)] Vary:[Accept]] {0xc000530280} -1 [] false false map[] 0xc000156200 0xc0000c26e0}
  </code></pre>