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

Function parse_method

src/utils/curl_parser.rs:180–191  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

178 let body = build_body(&data_parts, &form_parts, &headers);
179
180 let method = if force_get {
181 HttpMethod::Get
182 } else {
183 method.unwrap_or_else(|| {
184 if !matches!(body, RequestBody::None) {
185 HttpMethod::Post
186 } else {
187 HttpMethod::Get
188 }
189 })
190 };
191
192 Ok(ParsedCurl {
193 method,
194 url,

Callers 1

parse_curlFunction · 0.85

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected