(raw: &str)
| 191 | |
| 192 | Ok(ParsedCurl { |
| 193 | method, |
| 194 | url, |
| 195 | headers, |
| 196 | body, |
| 197 | }) |
| 198 | } |
| 199 | |
| 200 | fn parse_method(value: &str) -> HttpMethod { |
| 201 | match value.to_ascii_uppercase().as_str() { |
| 202 | "GET" => HttpMethod::Get, |
| 203 | "POST" => HttpMethod::Post, |
| 204 | "PUT" => HttpMethod::Put, |
| 205 | "DELETE" => HttpMethod::Delete, |
no test coverage detected