I've digged through the docs and Headers etc ... Can't find any feasible way of disposing a AWSTask after I start executing.
Is there any best-practice / method for doing this ?
AWSRequest, a parent of most of the request objects, has - cancel. You can use it to cancel the request.
Hey @yosuke-matsuda , thanks for your comment.
AWSTask specifically has no such method and doesn't inherit/owns AWSRequest.
There are some methods containing a cancellationToken parameter, but couldn't really understand the context of those.
You need to call - cancel on the request, not on the task object.
Some methods in the AWS SDK return a AWSTask. And there's no way to access it's request directly that I can see, meaning no way to cancel it directly ... unless I'm missing something?
Which method do you want to cancel?
For example, APIGateway has a invokeHTTPRequest method that returns a AWSTask. I would like to cancel this after firing and don't have access to the NSURLRequest, as it's created within the method.
Currently, the SDK generated by Amazon API Gateway does not support cancellation. We will share this as a feature request to the API Gateway team. Thanks.
Any updates on this? This should be fairly simple to implement.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
Most helpful comment
For example, APIGateway has a invokeHTTPRequest method that returns a AWSTask. I would like to cancel this after firing and don't have access to the NSURLRequest, as it's created within the method.