Skip to content

Commit

Permalink
Pure methods
Browse files Browse the repository at this point in the history
  • Loading branch information
soenneker committed Nov 22, 2023
1 parent 5794961 commit 6ecee14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Abstract/IHttpClientCache.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.Contracts;
using System.Net.Http;
using System.Threading.Tasks;

Expand All @@ -18,10 +19,12 @@ public interface IHttpClientCache : IAsyncDisposable, IDisposable
/// <param name="maxConnectionsPerServer">If this is null, this is set to 40</param>
/// <param name="timeout">If this is null, this is set to the default 100s</param>
/// <returns></returns>
[Pure]
ValueTask<HttpClient> Get(string id, TimeSpan? pooledConnectionLifetime = null, bool? cookieContainer = null, int? maxConnectionsPerServer = null, TimeSpan? timeout = null);

/// <inheritdoc cref="Get(string, TimeSpan?, bool?, int?, TimeSpan?)"/>"/>
/// <remarks><see cref="Get"/> async method is recommended</remarks>
[Pure]
HttpClient GetSync(string id, TimeSpan? pooledConnectionLifetime = null, bool? cookieContainer = null,
int? maxConnectionsPerServer = null, TimeSpan? timeout = null);

Expand Down

0 comments on commit 6ecee14

Please sign in to comment.