Add support for cancellation of HTTP requests.