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.
resp, err := http.Get("localhost:8080/stream")
if err != nil {
...
}
...
// perform work while connected and getting data
Any insight would be greatly appreciated!
Thanks!
-RC