title: How do I read a streaming response body using Golang's net/http package?
body: <p>I am trying to connect to an endpoint that does http streaming of json data.  I was wondering how to perform a basic request using Go's net/http package and read the response as it comes in.  Currently, I am only able to read the response when the connection closes.  </p>
  
  <pre><code>resp, err := http.Get("localhost:8080/stream")
  if err != nil {
      ...
  }
  ...
  // perform work while connected and getting data
  </code></pre>
  
  <p>Any insight would be greatly appreciated!</p>
  
  <p>Thanks!</p>
  
  <p>-RC</p>