You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: