getApiMethodEnum static method

ApiMethod getApiMethodEnum(
  1. String? method
)

Implementation

static ApiMethod getApiMethodEnum(String? method) {
  if (method == null) return ApiMethod.get;
  switch (method) {
    case "GET":
      return ApiMethod.get;
    case "POST":
      return ApiMethod.post;
    case "PUT":
      return ApiMethod.put;
    case "PATCH":
      return ApiMethod.patch;
    case "DELETE":
      return ApiMethod.delete;
    default:
      return ApiMethod.get;
  }
}