AdeptChopperClient class
base
Constructors
AdeptChopperClient ({Uri ? baseUrl , Client? client , Iterable ? interceptors , Authenticator? authenticator , Converter? converter , ErrorConverter? errorConverter , Iterable <ChopperService > ? services , Duration ? timeout })
Properties
authenticator
→ Authenticator?
The Authenticator
that can provide reactive authentication for a
request.
final inherited
baseUrl
→ Uri
Base URL of each request of the registered services.
E.g., the hostname of your service.
final inherited
converter
→ Converter?
The Converter
that handles request and response transformation before
the request and response interceptors are called respectively.
final inherited
errorConverter
→ ErrorConverter?
The ErrorConverter
that handles response transformation before the
response interceptors are called, but only on error responses
(statusCode < 200 || statusCode >= 300).
final inherited
hashCode
→ int
The hash code for this object.
no setter inherited
httpClient
→ Client
The http.Client
used to make network calls.
final inherited
onRequest
→ Stream <Request >
A stream of processed Request
s, as in after all Converter
s, and
RequestInterceptor
s have been run.
no setter inherited
onResponse
→ Stream <Response >
A stream of processed Response
s, as in after all Converter
s and
ResponseInterceptor
s have been run.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
timeout
↔ Duration ?
getter/setter pair
Methods
delete <BodyType , InnerType > (Uri url , {Map <String , dynamic > parameters = const {} , Uri ? baseUrl })
→ Future <Response<BodyType > >
Makes a HTTP DELETE request using the send function.
inherited
dispose ()
→ void
Disposes this ChopperClient
to clean up memory.
inherited
get <BodyType , InnerType > (Uri url , {Uri ? baseUrl , Map <String , dynamic > parameters = const {} , dynamic body })
→ Future <Response<BodyType > >
Makes a HTTP GET request using the send function.
inherited
getService <ServiceType extends ChopperService > ()
→ ServiceType
Retrieve any service included in the ChopperClient
inherited
head <BodyType , InnerType > (Uri url , {Map <String , dynamic > parameters = const {} , Uri ? baseUrl })
→ Future <Response<BodyType > >
Makes a HTTP HEAD request using the send function.
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options <BodyType , InnerType > (Uri url , {Map <String , dynamic > parameters = const {} , Uri ? baseUrl })
→ Future <Response<BodyType > >
Makes a HTTP OPTIONS request using the send function.
inherited
patch <BodyType , InnerType > (Uri url , {dynamic body , List <PartValue > parts = const [] , Map <String , dynamic > parameters = const {} , bool multipart = false , Uri ? baseUrl })
→ Future <Response<BodyType > >
Makes a HTTP PATCH request using the send function.
inherited
post <BodyType , InnerType > (Uri url , {dynamic body , List <PartValue > parts = const [] , Map <String , dynamic > parameters = const {} , bool multipart = false , Uri ? baseUrl })
→ Future <Response<BodyType > >
Makes a HTTP POST request using the send function
inherited
put <BodyType , InnerType > (Uri url , {dynamic body , List <PartValue > parts = const [] , Map <String , dynamic > parameters = const {} , bool multipart = false , Uri ? baseUrl })
→ Future <Response<BodyType > >
Makes a HTTP PUT request using the send function.
inherited
send <Body , ToDecode > (Request request , {ConvertRequest? requestConverter , ConvertResponse? responseConverter })
→ Future <Response<Body > >
Sends a pre-build Request
, applying all provided Interceptor
s and
Converter
s.
toString ()
→ String
A string representation of this object.
inherited