Class BaseRequester
- Namespace
- AngleSharp.Io
- Assembly
- AngleSharp.dll
Represents a useful abstraction for requesters.
public abstract class BaseRequester : EventTarget, IRequester, IEventTarget
- Inheritance
-
BaseRequester
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
BaseRequester()
protected BaseRequester()
Methods
PerformRequestAsync(Request, CancellationToken)
Performs the actual request asynchronously.
protected abstract Task<IResponse?> PerformRequestAsync(Request request, CancellationToken cancel)
Parameters
request
RequestThe options to consider.
cancel
CancellationTokenThe token for cancelling the task.
Returns
RequestAsync(Request, CancellationToken)
Performs an asynchronous request that can be cancelled.
public Task<IResponse?> RequestAsync(Request request, CancellationToken cancel)
Parameters
request
RequestThe options to consider.
cancel
CancellationTokenThe token for cancelling the task.
Returns
SupportsProtocol(string)
Checks if the given protocol is supported.
public abstract bool SupportsProtocol(string protocol)
Parameters
protocol
stringThe protocol to check for, e.g. http.
Returns
- bool
True if the protocol is supported, otherwise false.
Events
Requested
Fired when a request is finished.
public event DomEventHandler Requested
Event Type
Requesting
Fired when a request is starting.
public event DomEventHandler Requesting