Get class

Build fluent REST GET APIs

Example: get('/book') .query('count', '10') .fetchList((m) => Book.fromMap(m));

Inheritance
Mixed in types

Constructors

Get(String url)
Get.clone(Get route)
Get.copy(Route route)

Properties

getAfter → List<After>
final, inherited
getAuthHeaders → Map<String, String>
final, inherited
getBefore → List<Before>
final, inherited
getClient BaseClient
read / write, inherited
getCookies → List<ClientCookie>
final, inherited
getHeaders → Map<String, String>
final, inherited
getQuery → Map<String, dynamic>
final, inherited
getUrl → String
URL
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
metadataMap → Map<String, dynamic>
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

after(After interceptor) Get
override
authHeader(String scheme, String credentials) Get
override
authToken(String credentials) Get
override
basicAuth(String username, String password) Get
override
before(Before interceptor) Get
override
charset(String charset) Get
override
contentType(String mimeType, String charset) Get
override
override
cookies(List<ClientCookie> cookies) Get
override
exact({int statusCode, String body, List<int> bytes, String mimeType, String encoding, Map<String, String> headers, int contentLength}) AsyncStringResponse
expect(List<Checker<Response>> conditions) AsyncStringResponse
go({ResponseHook<String> onSuccess, ResponseHook<String> onFailure, ResponseHook<String> then, bool throwOnErr}) AsyncStringResponse
Issues the request and returns the response
override
Add headers
override
headers(Map<String, String> values) Get
Add headers
override
hookHeader(String key, ValueCallback<String> getter) Get
override
http(String origin, [String path]) Get
override
https(String origin, [String path]) Get
override
metadata(Map<String, dynamic> metaData) Get
override
mimeType(String mimeType) Get
override
origin(String origin, [String path]) Get
Set origin of the URL
override
path(String path) Get
Append path segments to the URL
override
pathParams(String name, dynamic value) Get
override
queries(Map<String, dynamic> value) Get
Add query parameters
override
query(String key, dynamic value) Get
Add query parameters
override
url(String url) Get
override
withClient(BaseClient client) Get
Set the client used to make HTTP requests
override
list<T>({T convert(Map d), FutureOr onError(StringResponse resp)}) → Future<List<T>>
Fetches json response and returns the decoded result
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
one<T>({T convert(Map d), FutureOr onError(StringResponse resp)}) → Future<T>
Fetches json response and returns the decoded result
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited