Table of Contents

Interface INetworkRequest

Namespace
MADE.Networking.Http.Requests
Assembly
MADE.Networking.dll

Defines an interface for a basic network request.

public interface INetworkRequest
Extension Methods

Properties

Headers

Gets the headers for the request.

Dictionary<string, string> Headers { get; }

Property Value

Dictionary<string, string>

Identifier

Gets the identifier for the request.

Guid Identifier { get; }

Property Value

Guid

Url

Gets or sets the URL for the request.

string Url { get; set; }

Property Value

string

Methods

ExecuteAsync(Type, CancellationToken)

Executes the network request.

Task<object> ExecuteAsync(Type expectedResponse, CancellationToken cancellationToken = default)

Parameters

expectedResponse Type

The type expected by the response of the request.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<object>

Returns the response of the request as an object.

ExecuteAsync<TResponse>(CancellationToken)

Executes the network request.

Task<TResponse> ExecuteAsync<TResponse>(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

Task<TResponse>

Returns the response of the request as the specified type.

Type Parameters

TResponse

The type of object returned from the request.