toHttpMethod method

HttpMethod toHttpMethod()

Implementation

HttpMethod toHttpMethod() {
  switch (this) {
    case 'GET':
      return HttpMethod.get;
    case 'HEAD':
      return HttpMethod.head;
    case 'POST':
      return HttpMethod.post;
    case 'PUT':
      return HttpMethod.put;
    case 'DELETE':
      return HttpMethod.delete;
    case 'CONNECT':
      return HttpMethod.connect;
    case 'OPTIONS':
      return HttpMethod.options;
    case 'TRACE':
      return HttpMethod.trace;
    case 'PATCH':
      return HttpMethod.patch;
  }
  throw Exception('$this is not known in enum HttpMethod');
}