mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
33 lines
680 B
Dart
33 lines
680 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'request.g.dart';
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class Request {
|
|
String url;
|
|
Map<String, dynamic>? extra;
|
|
|
|
Request({
|
|
required this.url,
|
|
});
|
|
|
|
factory Request.fromJson(Map<String, dynamic> json) =>
|
|
_$RequestFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$RequestToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class ReqExtraHttp {
|
|
String method = 'GET';
|
|
Map<String, String> headers = {};
|
|
String body = '';
|
|
|
|
ReqExtraHttp();
|
|
|
|
factory ReqExtraHttp.fromJson(Map<String, dynamic> json) =>
|
|
_$ReqExtraHttpFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$ReqExtraHttpToJson(this);
|
|
}
|