Skip to content

Implement HTTP progress event #10849

@JunielKatarn

Description

@JunielKatarn

See https://github.com/facebook/react-native/blob/v0.70.5/Libraries/Network/RCTNetworking.mm#L195 :

  return @[@"didCompleteNetworkResponse",
           @"didReceiveNetworkResponse",
           @"didSendNetworkData",
           @"didReceiveNetworkIncrementalData",
           @"didReceiveNetworkDataProgress",
           @"didReceiveNetworkData"];

Events didReceiveNetworkDataProgress and didReceiveNetworkIncrementalData are not triggered/handled by React Native Windows' HTTP module.

This prevents showing HTTP download progress in UI or acknowledging incremental data download steps.

Steps to reproduce

  1. Start the Playground app.
    Set-Location packages\playground
    yarn windows --sln windows\playground.sln
  2. Load the default bundle Samples\rntester.
  3. Open the XMLHttpRequest component.
  4. On the File Download section, click on the Download 7MB text file button.

Expected result

Progress and total size are displayed in the corresponding text label:
Screen Shot 2022-11-07 at 7 31 42 PM

Actual result

The progress indicator stays at 0.
sc

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions