http_service1 1.0.0+6
http_service1: ^1.0.0+6 copied to clipboard
Http Srevice1 package is to make it easy to implement the Http services in a Dart application.
example/lib/example.dart
import 'package:http/http.dart';
import 'package:http_service1/http_service1.dart';
import 'model.dart';
Future<void> example() async {
final HttpService service = HttpService(
Client(),
'https://jsonplaceholder.typicode.com/posts',
);
final res = await service.get<List<Model>>('', fromJson: modelFromJson);
print(res);
res.fold((l) => print, (r) => print);
}