MCPcopy Create free account
hub / github.com/bajrangCoder/setu / parse_header

Function parse_header

src/utils/curl_parser.rs:193–202  ·  view source on GitHub ↗
(raw: &str)

Source from the content-addressed store, hash-verified

191
192 Ok(ParsedCurl {
193 method,
194 url,
195 headers,
196 body,
197 })
198}
199
200fn 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,

Callers 1

parse_curlFunction · 0.85

Calls 2

split_onceFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected