import 'dart:convert'; import 'package:http/http.dart' as http; // WIP wrapper layer abstract class HTTP { static Future get({ required Uri url, Map? headers, required bool routeOverTor, }) async { if (routeOverTor) { // TODO throw UnimplementedError(); } else { return http.get(url, headers: headers); } } static Future post({ required Uri url, Map? headers, Object? body, Encoding? encoding, required bool routeOverTor, }) async { if (routeOverTor) { // TODO throw UnimplementedError(); } else { return http.post( url, headers: headers, body: body, encoding: encoding, ); } } }