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

Add support for progress events #104

Closed
dam0vm3nt opened this issue Jun 30, 2017 · 4 comments
Closed

Add support for progress events #104

dam0vm3nt opened this issue Jun 30, 2017 · 4 comments

Comments

@dam0vm3nt
Copy link

Is it possible to add support for progress event for both upload and download phases ?

@nex3
Copy link
Member

nex3 commented Jun 30, 2017

I can't see a clean way to integrate this into the API. The browser client can potentially add event streams to Response.context, but we can't return a Response object until the request has been fully sent, which means you wouldn't get any upload events.

In general, this package's goal is to create a cross-platform HTTP API. If you need advanced features that only work on a certain platform, such as progress reporting, you may be better off using the native APIs.

@nex3 nex3 closed this as completed Jun 30, 2017
@dam0vm3nt
Copy link
Author

actually I think those events should belong to the request. I've done it in my own browser_client implementation and I think it's not so bad. Take a look at this if you want.

@nex3
Copy link
Member

nex3 commented Jul 5, 2017

actually I think those events should belong to the request.

That doesn't match the structure of the package. The request flows into nested layers of clients; the base client (in this case BrowserClient) can't set fields on the request that the caller will see.

Take a look at this if you want.

This link looks broken.

@dam0vm3nt
Copy link
Author

dam0vm3nt commented Sep 13, 2017

@nex3 in the meanwhile it has moved here

I've used an expando to "extend" the request object with those extra properties, so this issue to me can actually stay closed. But I post this anyway because I think it can be usefull for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants