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

[fuel-core] Requests can not upload and download files in the same request #510

Closed
SleeplessByte opened this issue Nov 7, 2018 · 0 comments
Assignees
Labels
💎 feature New feature
Milestone

Comments

@SleeplessByte
Copy link
Collaborator

Feature Request

Description

Currently there is an ugly type map that determines which TaskRequest and which other behaviour is injected into a request, with errors when the type doesn't match. #491 already got rid of this behaviour for progress, but we are still limited to EITHER downloading OR uploading.

Proposed Solution

Downloading and uploading are request features that can be enabled for a request and then expose extra funtionality/methods. These features are NOT mutually exclusive and are compounded just like interceptors are.

Alternatives I've considered

Wrapping requests using inheritance. We rather use composition as this also makes it easier to extend this behaviour and allow for slight variations.

@SleeplessByte SleeplessByte added the 💎 feature New feature label Nov 7, 2018
@SleeplessByte SleeplessByte self-assigned this Nov 7, 2018
SleeplessByte added a commit that referenced this issue Nov 7, 2018
A lot of the parameters currently tracked by Request are actually options that are only used for the exection (and used by Client such as HttpClient). This change extracts these properties into executionOptions.

Additionally it implements downloads and uploads as features, instead of branches. This means that requests can do both instead of one of either. Fixes #510.

Finally it also makes sure that only requests that can be cancelled are exposing .cancel. Fixes #508. This also makes sure that #509 can be implemented.
@SleeplessByte SleeplessByte added this to the Fuel 2.0 milestone Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant