stringToHttpMethod function

HttpMethod stringToHttpMethod(
  1. String? method
)

Implementation

HttpMethod stringToHttpMethod(String? method) {
  switch (method) {
    case 'get':
      return HttpMethod.get;
    case 'post':
      return HttpMethod.post;
    case 'put':
      return HttpMethod.put;
    case 'delete':
      return HttpMethod.delete;
    case 'patch':
      return HttpMethod.patch;
    default:
      return HttpMethod.unknown;
  }
}