Skip to content

Feature Request: Support request abortion #161

@RTK

Description

@RTK

Subject of the issue

Right now, the plugin's feature of request abortion (https://github.com/silkimen/cordova-plugin-advanced-http#abort) is not supported. When a request via HttpClient gets aborted (no active subscribers on observable), the request will still be completed, even though the response will not be used.

Environment

  • version of angular
  • version of ionic-native-http-connection-backend - 3.3.0
  • version of @ionic/angular - does not matter
  • version of @awesome-cordova-plugins/http - 5.43.0

Steps to reproduce

Integrate native http backend, create a request via httpClient, unsubscribe before request ends, observe the native request getting completed and not aborted.

Expected behaviour

Requests should be canceable via the requestId property returned by the plugin. In a completer function the requestId can be used to abort the request.

Actual behaviour

Since this implementation relies on the awesome-cordova wrapper, which wraps the plugins functionalities in a Promise, the possibility to cancel a request gets lost. If you unsubscribe from a request it will complete.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions