logRequest static method

void logRequest(
  1. String method,
  2. Uri url, {
  3. Map<String, String>? headers,
  4. dynamic body,
})

Implementation

static void logRequest(String method, Uri url,
    {Map<String, String>? headers, dynamic body}) {
  print('--- REQUEST ---');
  print('Method: $method');
  print('URL: $url');
  if (headers != null) print('Headers: $headers');
  if (body != null) print('Body: $body');
  print('----------------');
}