diff --git a/src/http/partials/Client/HTTP.ClientTo.cs b/src/http/partials/Client/HTTP.ClientTo.cs index b99a5582..4895b237 100644 --- a/src/http/partials/Client/HTTP.ClientTo.cs +++ b/src/http/partials/Client/HTTP.ClientTo.cs @@ -128,6 +128,11 @@ public Task Open(string method, string url, string body, Encoding encode) return Open(method, url, body.GetBytes(encode)); } + public Task Close() + { + _cancellationToken.Cancel(throwOnFirstException: true); + return Task.CompletedTask; + } public int GetTimeout() { @@ -154,11 +159,6 @@ public void SetTimeout(int timeout) _timeout = timeout; } - public Task Close() - { - // TODO: impl it - throw new NotImplementedException(); - } private class BodyContent : HttpContent { private readonly byte[] _buffer;