formatHeadersForCopy static method

String formatHeadersForCopy(
  1. Map<String, dynamic> headers
)

Formats headers for clipboard paste into tools like Postman (bulk edit). One Key: Value entry per line; list values are joined with , .

Implementation

static String formatHeadersForCopy(Map<String, dynamic> headers) {
  if (headers.isEmpty) return '';
  return headers.entries
      .map((e) => '${e.key}: ${_stringifyHeaderValue(e.value)}')
      .join('\n');
}