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, 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. [...]
read-only, inherited
onSendProgress SendProgressFunc
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sequence bool
final
sumRequest int
read-only

Methods

close() → void
@Deprecated('use dispose'), @mustCallSuper
delete<Body>(String url, {Map<String, String> headers}) Stream
dispose() → void
dispose ChopperClient to clean memory
get<Body>(String url, {Map<String, String> headers}) Stream
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
patch<Body>(String url, {dynamic body, List<PartValue> parts, Map<String, String> headers}) Stream
post<Body>(String url, {dynamic body, List<PartValue> parts, Map<String, String> headers}) Stream
put<Body>(String url, {dynamic body, List<PartValue> parts, Map<String, String> headers}) 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