HttpMethod.fromString constructor
HttpMethod.fromString(
- String method
Implementation
factory HttpMethod.fromString(String method) {
switch (method) {
case "POST":
return post;
case "GET":
return get;
case "DELETE":
return delete;
case "PUT":
return put;
case "PATCH":
return patch;
case "HEAD":
return head;
default:
throw UnsupportedError('Method \'$method\' is not supported.');
}
}