retrofit
library
Classes
-
Body
-
Use this annotation on a service method param when you want to directly control the request body
of a POST/PUT request (instead of sending in as request parameters or form-style request
body).
-
BodyExtra
-
Use this annotation on a service method param when you want to add individual fields
to the request body without defining a complete DTO class. This is useful when you
need to include additional fields in the request body alongside existing data, or when
you only need to send a few specific fields without creating a full data transfer object.
-
CacheControl
-
-
CallAdapter<R, T>
-
Adapts a Call with return type R into the type of T.
e.g.
Future<User> to Future<Result<User>>
-
CancelRequest
-
Annotation for cancelling the request.
When applied to a parameter, allows the method to accept a
CancelToken
that can be used to cancel the HTTP request.
-
DELETE
-
Make a
DELETE request
-
DioOptions
-
Annotation for passing Dio options to individual requests.
-
DioResponseType
-
Annotation to specify the response type for Dio requests.
-
Extra data that will be passed to dio's request, response, transformer and interceptors.
-
Extra data that will be passed to dio's request, response, transformer and interceptors.
Simple Example:
-
Field
-
Named pair for a form request.
-
FormUrlEncoded
-
Denotes that the request body will use form URL encoding. Fields should be declared as
parameters and annotated with Field.
-
GET
-
Make a
GET request
-
HEAD
-
Make a
HEAD request
-
Replaces the header with the value of its target.
-
Adds headers specified in the value map.
-
HttpMethod
-
A holder that includes all http methods which are supported by retrofit.
-
HttpResponse<T>
-
Wrapper class that combines response data with the raw Dio response.
-
Method
-
-
MultiPart
-
Denotes that the request body is multi-part. Parts should be declared as parameters and
annotated with Part.
-
NoBody
-
Use this annotation on a service method param when you want to indicate that no body should be
generated for POST/PUT/DELETE requests.
-
OPTIONS
-
Make a
OPTIONS request
-
ParseErrorLogger
-
Base class for logging errors that occur during parsing of response data.
-
Part
-
Denotes a single part of a multi-part request.
Part parameters may not be null.
-
PATCH
-
Make a
PATCH request
-
Path
-
Named replacement in a URL path segment.
-
POST
-
Make a
POST request
-
PreventNullToAbsent
-
Prevents
null values from being converted to absent values in generated code for body.
-
PUT
-
Make a
PUT request
-
Queries
-
Query parameter keys and values appended to the URL.
-
Query
-
Query parameter appended to the URL.
-
ReceiveProgress
-
Annotation for tracking download progress.
When applied to a parameter, allows the method to accept a callback
function that will be invoked with progress updates during data reception.
-
RestApi
-
Define an API.
-
SendProgress
-
Annotation for tracking upload progress.
When applied to a parameter, allows the method to accept a callback
function that will be invoked with progress updates during data transmission.
-
Extra data that will be passed to Dio's request, response, transformer, and interceptors.
Extend TypedExtras and define fields that correspond to the keys passed into
extras.
The values of these fields will be derived from the data passed into your subclass.
-
UseCallAdapter
-
By annotating a method with
@UseCallAdapter, you can specify a custom adapter
class where you can adapt a call to another response wrapper
Enums
-
Parser
-
Define how to parse response json
If you want to support more, PR is welcome