methodFor static method

String methodFor(
  1. String endpoint
)

Implementation

static String methodFor(String endpoint) {
  return CaseStyle.splitWords(endpoint).first.toLowerCase() == 'get'
      ? 'GET'
      : 'POST';
}