MethodWithBody class
Constructors
-
MethodWithBody({String method = 'POST', dynamic uri, Map<
String, String> headers = const {}, Map<String, String> authHeaders = const {}, List<ClientCookie> cookies = const [], List<Before> before = const [], List<After> after = const [], Map<String, dynamic> metadata = const {}, BaseClient? client, dynamic body})
Properties
-
getAfter
→ List<
After> -
finalinherited
-
getAuthHeaders
→ Map<
String, String> -
finalinherited
-
getBefore
→ List<
Before> -
finalinherited
- getBody → dynamic
-
no setter
- getClient ↔ BaseClient?
-
getter/setter pairinherited
-
getCookies
→ List<
ClientCookie> -
finalinherited
-
getHeaders
→ Map<
String, String> -
finalinherited
-
getMetadata
→ Map<
String, dynamic> -
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- method ↔ String
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri ↔ MutUri
-
getter/setter pairinherited
Methods
-
after(
After interceptor) → MethodWithBody -
override
-
authHeader(
String scheme, String credentials) → MethodWithBody -
override
-
authToken(
String credentials) → MethodWithBody -
override
-
basicAuth(
String username, String password) → MethodWithBody -
override
-
before(
Before interceptor) → MethodWithBody -
override
-
body(
dynamic body) → MethodWithBody -
charset(
String charset) → MethodWithBody -
override
-
clone(
) → MethodWithBody -
override
-
contentType(
String mimeType, String charset) → MethodWithBody -
override
-
override
-
override
-
exact(
{int? statusCode, String? body, List< int> ? bytes, String? mimeType, String? encoding, Map<String, String> ? headers, int? contentLength, Map<String, dynamic> pathParams = const {}}) → Future<Response> -
inherited
-
expect(
List< Checker< conditions, {Map<Response> >String, dynamic> pathParams = const {}}) → Future<Response> -
inherited
-
go(
{ResponseHook? onSuccess, ResponseHook? onFailure, bool throwOnErr = false, Map< String, dynamic> pathParams = const {}}) → Future<Response> -
inherited
-
header(
String key, String value) → MethodWithBody -
Add headers
override
-
headers(
Map< String, String> values) → MethodWithBody -
Add headers
override
-
hookHeader(
String key, ValueCallback< String?> getter) → MethodWithBody -
override
-
http(
String origin, [String? path]) → MethodWithBody -
override
-
https(
String origin, [String? path]) → MethodWithBody -
override
-
json(
dynamic body, {bool setHeaders = true}) → MethodWithBody -
metadata(
Map< String, dynamic> value) → MethodWithBody -
override
-
mimeType(
String mimeType) → MethodWithBody -
override
-
multipart(
Map< String, dynamic> values) → MethodWithBody -
multipartField(
String field, dynamic value) → MethodWithBody -
multipartFile(
String field, List< int> ? value, {String? filename, MediaType? contentType}) → MethodWithBody -
multipartStringFile(
String field, String? value, {String? filename, MediaType? contentType}) → MethodWithBody -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
origin(
String origin, [String? path]) → MethodWithBody -
Set origin of the URL
override
-
path(
String path) → MethodWithBody -
Append path segments to the URL
override
-
pathParam(
String name, dynamic value) → MethodWithBody -
override
-
pathParams(
Map< String, dynamic> pathParams) → MethodWithBody -
override
-
queries(
Map< String, dynamic> value) → MethodWithBody -
Add query parameters
override
-
query(
String key, dynamic value) → MethodWithBody -
Add query parameters
override
-
readBytes(
{Map< String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?}) → Future<List< int> ?> -
inherited
-
readList<
T> ({T convert(Map d)?, Map< String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?}) → Future<List< T> ?> -
Fetches json response and returns the decoded result
inherited
-
readOne<
T> ({T convert(Map d)?, Map< String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?}) → Future<T?> -
Fetches json response and returns the decoded result
inherited
-
readString(
{Map< String, dynamic> pathParams = const {}, FutureOr onError(Response resp)?}) → Future<String?> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
url(
String value) → MethodWithBody -
override
-
urlEncodedForm(
Map< String, dynamic> values) → MethodWithBody -
urlEncodedFormField(
String name, dynamic value) → MethodWithBody -
withClient(
BaseClient client) → MethodWithBody -
Set the
client
used to make HTTP requestsoverride
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited