Skip to content

Options to cancel a Task. #128

Closed
Closed
@fabianfett

Description

@fabianfett

Hi, the AsyncHTTPClient currently has an interface, that makes the consumer choose between

  1. shorthands to get/post/execute, where the consumer doesn’t have to implement the delegate but has no chance to cancel a task
  2. full access to the task but one has to implement the delegate.

I would like to be able to cancel my request but I don’t want to implement the delegate protocol myself. Currently the ResponseAccumulator is an internal class and therefore can’t be used by a consumer.

Would it be possible to make the ResponseAccumulator public? Or can we build an execute method that doesn't need a delegate but returns a Task instead of a Response?

Whatever the preferred way is, if there is a decision on how to move forward, I'd be interested in creating a potential PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementImprovements to existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions