Compare commits

..

6 commits

Author SHA1 Message Date
73a9ca3be9 feat(net)!: net api: net.{get,post,etc..}(url) alternative to net.send(request) 2024-11-20 19:40:17 +00:00
d987da320b feat(fs): add TempFileSystem::as_real() 2024-11-20 19:38:44 +00:00
d52ab2df2e feat(net)!: new api: .on().respond().{status,header{s},body}(_)?, replacing respond(response)
Some checks failed
Rust / build (map[name:stable]) (push) Failing after 2m12s
Rust / build (map[name:nightly]) (push) Failing after 2m30s
2024-11-20 19:38:44 +00:00
7da221bfde feat(net)!: new api: .on().{get,post, etc}(url), replacing .on(method).get(url)
All checks were successful
Rust / build (map[name:nightly]) (push) Successful in 7m20s
Rust / build (map[name:stable]) (push) Successful in 4m11s
Release Please / Release-plz (push) Successful in 1m39s
The `http::Method` parameter is not needed as we now use named methods that the methods on the underlying `reqwest` client.

The `url` parameter can be a `String` or `&str` rather than a parsed, and error handled `url::Url`.
2024-11-20 19:38:05 +00:00
a84643e6ae fix(net)!: Remove MatchOn
All checks were successful
Rust / build (map[name:stable]) (push) Successful in 6m3s
Rust / build (map[name:nightly]) (push) Successful in 8m15s
Release Please / Release-plz (push) Successful in 59s
`MatchOn` was left behind from the v1 implementation and isn't used by
anything in the v2 implementation.
2024-11-20 19:37:06 +00:00
711c76a600 feat: re-export http::HeaderMap
All checks were successful
Rust / build (map[name:nightly]) (push) Successful in 4m33s
Rust / build (map[name:stable]) (push) Successful in 5m29s
Release Please / Release-plz (push) Successful in 1m15s
2024-11-20 19:37:06 +00:00
2 changed files with 7 additions and 1 deletions

View file

@ -149,6 +149,7 @@ pub use result::{Error, Result};
pub use system::{MockNet, Net};
pub use http::HeaderMap;
pub use http::Method;
pub use http::StatusCode;
pub use reqwest::Client;
pub use reqwest::Error as RequestError;

View file

@ -120,7 +120,12 @@ impl Net {
return request.into().send().await.map_err(Error::from);
};
let request = request.into().build()?;
eprintln!("? {} {} {:?}", request.method(), request.url(), request.headers());
eprintln!(
"? {} {} {:?}",
request.method(),
request.url(),
request.headers()
);
let index = plans
.lock()
.await