Skip to content

Commit

Permalink
implement HTTP.ClientTo->Close
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed Jun 18, 2024
1 parent 0a7c802 commit 040cb5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/http/partials/Client/HTTP.ClientTo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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;
Expand Down

0 comments on commit 040cb5d

Please sign in to comment.