toMethod method
Implementation
Method toMethod() {
switch (this) {
case 'GET':
return Method.get;
case 'HEAD':
return Method.head;
case 'POST':
return Method.post;
case 'PUT':
return Method.put;
case 'PATCH':
return Method.patch;
case 'OPTIONS':
return Method.options;
case 'DELETE':
return Method.delete;
}
throw Exception('$this is not known in enum Method');
}