You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
383 B
17 lines
383 B
import 'package:retrofit/retrofit.dart';
|
|
import 'package:dio/dio.dart';
|
|
|
|
part 'user_api.g.dart';
|
|
|
|
@RestApi(baseUrl: 'https://api.example.com/')
|
|
abstract class UserApi {
|
|
factory UserApi(Dio dio) = _UserApi;
|
|
|
|
@POST("auth/login")
|
|
Future<HttpResponse<dynamic>> login(
|
|
@Body() Map<String, dynamic> data,
|
|
);
|
|
|
|
@GET("user/info")
|
|
Future<HttpResponse<dynamic>> getUserInfo();
|
|
}
|