escapeHeaderValueForDoubleQuotes static method

String escapeHeaderValueForDoubleQuotes(
  1. String value
)

Escape valore per uso dentro doppie virgolette in shell (-H "...").

Implementation

static String escapeHeaderValueForDoubleQuotes(String value) {
  return value.replaceAll(r'\', r'\\').replaceAll('"', r'\"');
}