Class AttachCookiesHandler
Any request will include the cookie existing on the browser and will send this to the backend. Backend must be in fact a Blazor SSR service.
[Export]
public class AttachCookiesHandler : DelegatingHandler, IDisposable
- Inheritance
-
AttachCookiesHandler
- Implements
- Inherited Members
Methods
SendAsync(HttpRequestMessage, CancellationToken)
Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
requestHttpRequestMessageThe HTTP request message to send to the server.
cancellationTokenCancellationTokenA cancellation token to cancel operation.
Returns
- Task<HttpResponseMessage>
The task object representing the asynchronous operation.
Exceptions
- ArgumentNullException
The
requestwas null.- OperationCanceledException
The cancellation token was canceled. This exception is stored into the returned task.