stringToHttpMethod function
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;
}
}