WordpressRequest class final

Represents a request to the Wordpress REST API.

Constructors

WordpressRequest({required RequestUrl url, required HttpMethod method, Map<String, dynamic>? headers, Map<String, dynamic>? queryParameters, dynamic body, WordpressEvents? events, CancelToken? cancelToken, bool requireAuth = false, IAuthorization? authorization, ValidatorCallback? validator, Duration sendTimeout = DEFAULT_REQUEST_TIMEOUT, Duration receiveTimeout = DEFAULT_REQUEST_TIMEOUT})
const

Properties

authorization IAuthorization?
The authorization instance.
final
body → dynamic
The request body.
final
cancelToken → CancelToken?
The cancel token.
final
events WordpressEvents?
The events instance.
final
hasAuthorization bool
Gets if this request has a authorization module.
no setter
hasEvents bool
Gets if this request has events.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasValidator bool
Gets if this request has a validator overload.
no setter
headers Map<String, dynamic>?
The request headers.
final
method HttpMethod
The request method.
final
queryParameters Map<String, dynamic>?
The request query parameters.
final
receiveTimeout Duration
The request receive timeout.
final
requireAuth bool
Specifies if this request requires authentication.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendTimeout Duration
The request send timeout.
final
url RequestUrl
The request url.
final
validator ValidatorCallback?
The validator callback.
final

Methods

copyWith({RequestUrl? url, HttpMethod? method, Map<String, dynamic>? headers, Map<String, dynamic>? queryParameters, dynamic body, WordpressEvents? events, CancelToken? cancelToken, bool? requireAuth, IAuthorization? authorization, ValidatorCallback? validator, Duration? sendTimeout, Duration? receiveTimeout}) WordpressRequest
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