Class OfflineHttpMessageHandler
- Namespace
- Fusillade
- Assembly
- Fusillade.dll
A http handler that will make a response even if the HttpClient is offline.
- Inheritance
-
Offline
Http Message Handler
- Implements
- Inherited Members
Remarks
Initializes a new instance of the Offline
Constructors
OfflineHttpMessageHandler(Func<HttpRequestMessage, string, CancellationToken, Task<byte[]>>?)
A http handler that will make a response even if the HttpClient is offline.
public OfflineHttpMessageHandler(Func<HttpRequestMessage, string, CancellationToken, Task<byte[]>>? retrieveBodyFunc)
Parameters
retrieveBodyFunc
Func<HttpRequest , string, CancellationMessage Token , Task<byte[]>>A function that will retrieve a body.
Remarks
Initializes a new instance of the Offline
Methods
SendAsync(HttpRequestMessage, CancellationToken)
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
request
HttpRequest Message cancellationToken
CancellationToken