HttpClient constructor
HttpClient({})
Creates an HttpClient.
Provide a baseUrl for relative requests. You can optionally inject an
http.Client for testing purposes or custom configurations.
Implementation
HttpClient({
required this.baseUrl,
Map<String, String>? defaultHeaders,
this.timeout = const Duration(seconds: 50),
http.Client? client,
}) : defaultHeaders = defaultHeaders ?? {},
_client = client ?? http.Client();