Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(http): implement streaming upload/download #2795

Closed
jeffbcross opened this issue Jun 30, 2015 · 5 comments
Closed

feat(http): implement streaming upload/download #2795

jeffbcross opened this issue Jun 30, 2015 · 5 comments
Labels
effort3: weeks feature Issue that requests a new feature

Comments

@jeffbcross
Copy link
Contributor

A user should be able to provide observers as part of a Request or RequestOptions object in order to receive progress updates and chunks of data for uploading and downloading of data.

Download observers will receive Responses, while upload observers will receive some form of Progress Event

To support different semantics of subscriptions between RxJS Observables and Dart Streams, an Observer implementation should be provided which will translate nicely to both platforms.

var myObserver = new Observer(res => this.progress = res.bytesLoaded / res.totalBytes);
http.request('https://foo', {
  downloadObserver: myObserver,
  uploadObserver: null
}).subscribe(res => this.finalResponse = res.json());

The Response Observable returned from Http should still emit a single Response value and complete when the connection closes.

In order to perform the request without requiring a subscription on the Response Observable this feature would also require providing a means of specifying that the request should be executed immediately. This should be an additional property of Request and RequestOptions, name TBD.

These observers can be tested with the MockBackend, using methods called mockUpload and mockDownload.

@letmejustfixthat
Copy link

since there wasn't an update in 6 months here, is there any information when this feature is going to be implemented? I want to build a server-sided push-service using a constant http-stream and would love this very much.

@robwormald
Copy link
Contributor

This issue was moved to angular/http#77

@adarshaj
Copy link

Where is this issue being tracked now?

@DzmitryShylovich
Copy link
Contributor

#10424

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort3: weeks feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

6 participants