RestAccessor class abstract

Defines the Rest/HTTP operations.

Constructors

RestAccessor()

Properties

hashCode int
The hash code for this object.
no setterinherited
parserFactory ParserFactory
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete<Output>({Map<String, String>? queryParams, Map<String, String>? pathParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
For Rest/ DELETE operation. queryParams will add the parameters as a query url/?key1=value1&key2=value2... pathParams will transform any value such as {key} in a url, for instance if the URL defined is '/customer/{customerId}' then any key/value in the map such as pathParamscustomerId='123456' will be transformed as '/customer/123456' It is possible to define a specific HeaderBuilder
get<Output>({Map<String, String>? queryParams, Map<String, String>? pathParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
For Rest/ GET operation. queryParams will add the parameters as a query url/?key1=value1&key2=value2... pathParams will transform any value such as {key} in a url, for instance if the URL defined is '/customer/{customerId}' then any key/value in the map such as pathParamscustomerId='123456' will be transformed as '/customer/123456' It is possible to define a specific HeaderBuilder
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch<Input, Output>(Input input, {Map<String, String>? queryParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
For Rest/ PATCH operation. When doing PATCH you have to define the return type expected, even if it is the same as Input In case no return value is expected, you must use NoResponseExpected, for instance: put<Car,NoResponseExpected>(myCar); It is possible to define a specific HeaderBuilder
post<Input, Output>(Input input, {Map<String, String>? queryParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
For Rest/ POST operation. When doing POST you have to define the return type expected, even if it is the same as Input In case no return value is expected, you must use NoResponseExpected, for instance: post<Car,NoResponseExpected>(myCar); It is possible to define a specific HeaderBuilder
put<Input, Output>(Input input, {Map<String, String>? queryParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
For Rest/ PUT operation. When doing PUT you have to define the return type expected, even if it is the same as Input In case no return value is expected, you must use NoResponseExpected, for instance: put<Car,NoResponseExpected>(myCar); It is possible to define a specific HeaderBuilder
service<Output>(Method method, String path, Map<String, dynamic> input, {Map<String, String>? queryParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
serviceAnyBody<Output>(Method method, String path, dynamic input, {Map<String, String>? queryParams, HeaderBuilder? headerBuilder}) Future<ServiceResult>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

build(URLFactory urlFactory, HeaderBuilder? defaultHeaderBuilder) RestAccessor
Build method used internally. Do not use it. It will be hidden in future version.