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
Identifier
Gets the identifier for the request.
Guid Identifier { get; }
Property Value
Url
Gets or sets the URL for the request.
string Url { get; set; }
Property Value
Methods
ExecuteAsync(Type, CancellationToken)
Executes the network request.
Task<object> ExecuteAsync(Type expectedResponse, CancellationToken cancellationToken = default)
Parameters
expectedResponseTypeThe type expected by the response of the request.
cancellationTokenCancellationTokenThe cancellation token.
Returns
ExecuteAsync<TResponse>(CancellationToken)
Executes the network request.
Task<TResponse> ExecuteAsync<TResponse>(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TResponse>
Returns the response of the request as the specified type.
Type Parameters
TResponseThe type of object returned from the request.