http icon indicating copy to clipboard operation
http copied to clipboard

How to use Streamed Response?

Open ash-hashtag opened this issue 3 years ago • 0 comments

I can't figure out, A streamed response is only returned if we use a streamed request, So I tried to use a streamed request for just "GET" method, and I don't even understand how to send it,

  final request = http.StreamedRequest("GET", Uri.parse(url));

  final response = await request.send();
  print("did we reeaally send?...."); // It never gets past this and it didn't send I checked logs of the server

  response.stream.listen(doSomething)

What am I missing?

ash-hashtag avatar Oct 19 '22 17:10 ash-hashtag