()
| 411 | let cmd = r#"curl -X POST 'https://api.example.com/users' \ |
| 412 | -H 'Content-Type: application/json' \ |
| 413 | -H 'Accept: application/json' \ |
| 414 | -d '{"name":"alice"}'"#; |
| 415 | let parsed = parse_curl(cmd).unwrap(); |
| 416 | assert_eq!(parsed.method, HttpMethod::Post); |
| 417 | assert_eq!(parsed.url, "https://api.example.com/users"); |
| 418 | assert_eq!(parsed.headers.len(), 2); |
| 419 | match &parsed.body { |
| 420 | RequestBody::Json(s) => assert_eq!(s, r#"{"name":"alice"}"#), |
nothing calls this directly
no test coverage detected