Patch class

Build fluent REST PATCH APIs

Example: patch('/book/${id}') .json(book.toMap) .fetch((m) => Book.fromMap(m));

Inheritance
Implemented types
Mixed in types

Constructors

Patch(String url)
Patch.clone(Patch route)
Patch.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) Patch
override
authHeader(String scheme, String credentials) Patch
override
authToken(String credentials) Patch
override
basicAuth(String username, String password) Patch
override
before(Before interceptor) Patch
override
body(dynamic body) Patch
charset(String charset) Patch
override
contentType(String mimeType, String charset) Patch
override
override
cookies(List<ClientCookie> cookies) Patch
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
getBody() → dynamic
override
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) Patch
Add headers
override
hookHeader(String key, ValueCallback<String> getter) Patch
override
http(String origin, [String path]) Patch
override
https(String origin, [String path]) Patch
override
json(dynamic body, {bool setHeaders: true}) Patch
metadata(Map<String, dynamic> metaData) Patch
override
mimeType(String mimeType) Patch
override
multipart(Map<String, dynamic> values) Patch
multipartField(String field, dynamic value) Patch
multipartFile(String field, List<int> value, {String filename, MediaType contentType}) Patch
multipartStringFile(String field, String value, {String filename, MediaType contentType}) Patch
origin(String origin, [String path]) Patch
Set origin of the URL
override
path(String path) Patch
Append path segments to the URL
override
pathParams(String name, dynamic value) Patch
override
queries(Map<String, dynamic> value) Patch
Add query parameters
override
query(String key, dynamic value) Patch
Add query parameters
override
url(String value) Patch
override
urlEncodedForm(Map<String, dynamic> values) Patch
urlEncodedFormField(String name, dynamic value) Patch
withClient(BaseClient client) Patch
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