IRequest class abstract base

Base class of all requests.

Implementers

Constructors

IRequest({bool requireAuth = true, CancelToken? cancelToken, IAuthorization? authorization, Duration sendTimeout = const Duration(seconds: 30), Duration receiveTimeout = const Duration(seconds: 30), WordpressEvents? events, ValidatorCallback? validator, Map<String, dynamic>? extra, Map<String, String>? headers, Map<String, dynamic>? queryParameters})
Creates a new instance of IRequest.
const

Properties

authorization IAuthorization?
The authorization to use for the request.
final
cancelToken → CancelToken?
The cancel token to cancel the request.
final
events WordpressEvents?
The events to listen to.
final
extra Map<String, dynamic>?
Allows you to pass custom key value pairs with the requests.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
The extra headers to send with the request.
final
queryParameters Map<String, dynamic>?
The query parameters to send with the request.
final
receiveTimeout Duration
The timeout duration for receiving the response.
final
requireAuth bool
Whether the request requires authentication.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendTimeout Duration
The timeout duration for sending the request.
final
validator ValidatorCallback?
The validator to validate the response.
final

Methods

build(Uri baseUrl) FutureOr<WordpressRequest>
Builds the request content.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String key) String