ChopperClient class
Root object of chopper Used to manager services, encode data, intercept request, response and error.
Constructors
-
ChopperClient({String baseUrl = "", BaseOptions? ops, List<
Interceptor> ? iterable, required ErrorConverter errorConverter, SendProgressFunc? onSendProgress, bool sequence = false, HttpClientAdapter? adapter, Iterable<ChopperService> services = const []})
Properties
- baseUrl → String
-
base url of each request to your api
hostname of your api for example
final
- dio → Dio
-
http client used to do request
from
package:http/http.dart
final - errorConverter → ErrorConverter
-
converter call on error request
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onSendProgress → SendProgressFunc?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequence → bool
-
final
- sumRequest → int
-
no setter
Methods
-
close(
) → void -
delete<
Body> (String url, {Map< String, String> headers = const {}}) → Stream -
dispose(
) → void - dispose ChopperClient to clean memory
-
get<
Body> (String url, {Map< String, String> headers = const {}}) → Stream -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch<
Body> (String url, {dynamic body, List< PartValue> parts = const [], Map<String, String> headers = const {}}) → Stream -
post<
Body> (String url, {dynamic body, List< PartValue> parts = const [], Map<String, String> headers = const {}}) → Stream -
put<
Body> (String url, {dynamic body, List< PartValue> parts = const [], Map<String, String> headers = const {}}) → Stream -
send<
Body> (Request request) → Stream< Body?> -
sendWarpMyResponse<
Body> (Request request) → Stream< MyResponse< Body> > -
service<
T extends ChopperService> (Type type) → T -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited