Table of Contents

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 Request

The options to consider.

cancel CancellationToken

The token for cancelling the task.

Returns

Task<IResponse>

The task resulting in the response.

RequestAsync(Request, CancellationToken)

Performs an asynchronous request that can be cancelled.

public Task<IResponse?> RequestAsync(Request request, CancellationToken cancel)

Parameters

request Request

The options to consider.

cancel CancellationToken

The token for cancelling the task.

Returns

Task<IResponse>

The task that will eventually give the response data.

SupportsProtocol(string)

Checks if the given protocol is supported.

public abstract bool SupportsProtocol(string protocol)

Parameters

protocol string

The 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

DomEventHandler

Requesting

Fired when a request is starting.

public event DomEventHandler Requesting

Event Type

DomEventHandler