microsoft / microsoft/react-native-windows

Implement HTTP progress event

Open
#10,849 0 comments 0 reactions 1 assignee View on GitHub

@JunielKatarn is already working on this.

Since Nov 8, 2022.

Area: Networking enhancement Workstream: Component Parity
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.