Skip to content

IRequestCache.SaveAsync(HttpRequestMessage, HttpResponseMessage, string, CancellationToken) method

Defined in

Type: IRequestCache Namespace: Fusillade.Reactive Assembly: Fusillade.Reactive.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Task SaveAsync(HttpRequestMessage request, HttpResponseMessage response, string key, CancellationToken ct)

Summary: Implement this method by saving the Body of the response. The response is already downloaded as a ByteArrayContent so you don't have to worry about consuming the stream.

Parameters

NameTypeDescription
requestHttpRequestMessageThe originating request.
responseHttpResponseMessageThe response whose body you should save.
keystringA unique key used to identify the request details.
ctCancellationTokenCancellation token.

Returns: Task -- Completion.