Request class

A generic JSON:API request.

Mixed-in types

Constructors

Request(String method, [Object? document])
Creates a new instance if the request with the specified HTTP method and document.
Request.delete([Object? document])
Creates a DELETE request.
Request.get()
Creates a GET request.
Request.patch([Object? document])
Creates a PATCH request.
Request.post([Object? document])
Creates a POST request.

Properties

document Object?
JSON:API document. This object can be of any type as long as it is encodable by the PayloadCodec used in the Client.
final
hashCode int
The hash code for this object.
no setterinherited
headers LinkedHashMap<String, String>
Message headers. Case-insensitive.
finalinherited
method String
HTTP method
final
query Map<String, String>
Query parameters
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fields(Map<String, Iterable<String>> fields) → void
Requests sparse fieldsets. See https://jsonapi.org/format/#fetching-sparse-fieldsets
filter(Map<String, String> filter) → void
Response filtering. https://jsonapi.org/format/#fetching-filtering
include(Iterable<String> include) → void
Requests inclusion of related resources. See https://jsonapi.org/format/#fetching-includes
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
page(Map<String, String> page) → void
Sets pagination parameters. See https://jsonapi.org/format/#fetching-pagination
sort(Iterable<String> sort) → void
Sets sorting parameters. See https://jsonapi.org/format/#fetching-sorting
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited