okdio library
Classes
- Body
-
Declare Body of
POST
,PUT
,PATCH
request - ChopperApi
-
Define an APi
baseUrl determine the prefix of every request in this api
name
generate class name - ChopperClient
- Root object of chopper Used to manager services, encode data, intercept request, response and error.
- ChopperError
- ChopperService
- Used by generator to generate apis
- Converter
- CurlInterceptor
- Interceptor that print a curl request thanks @edwardaux
- Delete
- Define a method as an Http DELETE request
- DioOptions
- FactoryConverter
- Field
- Define fields witll be convert to { 'key': value }
- FileField
- Use to define a file filed for Multipart request @Post(path: 'file') @multipart Future
- FormUrlEncodedConverter
- Get
- Define a method as an Http GET request
- Header
- Override header using method parameter
- HeadersInterceptor
- HttpLoggingInterceptor
- HttpMethod
- JsonConverter
- Method
- Multipart
- define a multipart request
-
MyResponse<
Body> - Part
- Use to define part of Multipart request
-
PartFile<
T> -
PartValue<
T> - Patch
- Define a method as an Http PATCH request use Body annotation to determine data to send
- Path
- Define path parameter of an url
- Post
- Define a method as an Http POST request use Body annotation to determine data to send
- Put
- Define a method as an Http PUT request use Body annotation to determine data to send
- Query
- Define query parameters of a request
- Request
- RequestInterceptor
- ResponseInterceptor
Constants
- body → const Body
- contentTypeKey → const String
- formEncodedHeaders → const String
- jsonHeaders → const String
- multipart → const Multipart
Properties
- chopperLogger → Logger
-
final
Functions
Typedefs
- ConvertRequest = Request Function(Request request)
-
ConvertResponse<
T> = MyResponse Function(MyResponse response) - ErrorConverter = ChopperError Function(dynamic error)
-
RequestInterceptorFunc
= FutureOr<
Request> Function(Request request) -
ResponseInterceptorFunc<
Value> = FutureOr< MyResponse> Function(MyResponse<Value> response) - SendProgressFunc = void Function(int send, int total)