diff options
| author | Brad Clawsie <brad@b7j0c.org> | 2026-11-18 11:20:45 -0600 |
|---|---|---|
| committer | Brad Clawsie <brad@b7j0c.org> | 2026-11-18 11:20:45 -0600 |
| commit | 1c286d81e9faad5a128e58671e791f9f70bb943c (patch) | |
| tree | d0e087d8c07d290b97037af57c1ebce5efb53a9c /learn_14/src | |
| parent | d054f5721d7c0643b147afc632b82783e4ea9bf6 (diff) | |
fix: learn_14
Diffstat (limited to 'learn_14/src')
| -rw-r--r-- | learn_14/src/main.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/learn_14/src/main.rs b/learn_14/src/main.rs index 93ce1c7..937098f 100644 --- a/learn_14/src/main.rs +++ b/learn_14/src/main.rs @@ -201,5 +201,14 @@ mod tests { let builder10 = RequestBuilder::new(Method::Delete, "/abc".to_string()); assert!(builder10.build().is_ok()); + + let builder11 = RequestBuilder::new(Method::Post, "/abc".to_string()); + let builder12 = builder11.header("a".to_string(), "b".to_string()); + let builder13 = builder12.body(vec![0 as u8]); + let req13 = builder13.build().unwrap(); + assert_eq!(req13.method, Method::Post); + assert_eq!(req13.headers, vec![("a".to_string(), "b".to_string())]); + assert_eq!(req13.body, Some(vec![0 as u8])); + } } |
