Reformat code
This commit is contained in:
@@ -70,13 +70,12 @@ class ApiClient {
|
||||
}
|
||||
|
||||
/// Performs a GET request to the given endpoint.
|
||||
Future<http.Response> get(
|
||||
String endpoint, {
|
||||
bool isBinary = false,
|
||||
}) async {
|
||||
Future<http.Response> get(String endpoint, {bool isBinary = false}) async {
|
||||
final url = Uri.parse('$baseUrl$endpoint');
|
||||
final response =
|
||||
await http.get(url, headers: _buildHeaders(isBinary: isBinary));
|
||||
final response = await http.get(
|
||||
url,
|
||||
headers: _buildHeaders(isBinary: isBinary),
|
||||
);
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
_log.warning(
|
||||
@@ -93,10 +92,7 @@ class ApiClient {
|
||||
}
|
||||
|
||||
/// Performs a POST request with JSON body.
|
||||
Future<http.Response> post(
|
||||
String endpoint,
|
||||
Map<String, dynamic> body,
|
||||
) async {
|
||||
Future<http.Response> post(String endpoint, Map<String, dynamic> body) async {
|
||||
final url = Uri.parse('$baseUrl$endpoint');
|
||||
|
||||
final response = await http.post(
|
||||
|
||||
Reference in New Issue
Block a user