Table of Contents

Class OfflineHttpMessageHandler

Namespace
Fusillade
Assembly
Fusillade.dll

A http handler that will make a response even if the HttpClient is offline.

public class OfflineHttpMessageHandler : HttpMessageHandler, IDisposable
Inheritance
OfflineHttpMessageHandler
Implements
Inherited Members

Remarks

Initializes a new instance of the OfflineHttpMessageHandler class.

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<HttpRequestMessage, string, CancellationToken, Task<byte[]>>

A function that will retrieve a body.

Remarks

Initializes a new instance of the OfflineHttpMessageHandler class.

Methods

SendAsync(HttpRequestMessage, CancellationToken)

protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage
cancellationToken CancellationToken

Returns

Task<HttpResponseMessage>