Nazar Vovk

Results 10 comments of Nazar Vovk

Http2Adapter: download() executed in 0:00:10.798213 on size 16256346 IOHttpClientAdapter: download() executed in 0:00:05.080164 on size 16256346 CupertinoAdapter: download() executed in 0:00:05.466801 on size 16256346

@brianquinlan Perhaps, I misunderstood how `StreamController(sync: true)` is working. I want to be able to send data into the StreamingRequest sink with knowledge of how much of the data is...

@AlexV525 Are you planning on maintaining [cookie_jar](https://github.com/flutterchina/cookie_jar) as well?

@ueman While `onReceiveProgress` has a pretty straightforward fix (I'll create PR today for this), I am not sure about how to fix `onSendProgress` because adapter converts the request object to...

> I think in the future we should get rid of that conversion layer That won't help to fix `onSendProgress`. `cupertino_http` and `cronet_http` drains the stream before sending the whole...

I think that is desired behavior for them. They don't have any use cases for request streams, as there is no way to set the request body as a stream...

I made a future request for cupertino_http package and when this is merged StreamingRequest will be working as intended. This should unblock the implementation of onSendProgress. https://github.com/dart-lang/http/issues/974 https://github.com/dart-lang/http/pull/975

@AlexV525 It definitely requires implementation of the condition when to use `StreamedRequest` in native clients. Should it be when `onSendProgress` callback is provided? Or should we create a new field...

@AlexV525 https://github.com/dart-lang/http/issues/974#issuecomment-1641850725 This prevents `onSendProgress` from working correctly.

I agree. The only question is when we want to use `StreamedRequest` because for simple requests streams could be slower in the case of native clients. https://github.com/dart-lang/http/blob/b2067710f88980fc0fee43ec3380bce089f001db/pkgs/cupertino_http/lib/src/cupertino_client.dart#L255-L256