post<T> method
post
Future<Response> login(String? name, String? pwd) {
var param = LoginParam(name, pwd);
return httpServer.post("/login/v1/xxx",
data: param.toJson());
}
Implementation
Future<Response<T>> post<T>(
String path, {
data,
Map<String, dynamic>? queryParameters,
Options? options,
CancelToken? cancelToken,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
return await _dio.post(path,
data: data,
queryParameters: queryParameters,
options: options,
cancelToken: cancelToken,
onSendProgress: onReceiveProgress,
onReceiveProgress: onReceiveProgress);
}