Compare commits

..

6 commits

Author SHA1 Message Date
0641752a29 feat(net)!: net api: net.{get,post,etc..}(url) alternative to net.send(request) 2024-11-20 19:26:52 +00:00
f2957b2d67 feat(fs): add TempFileSystem::as_real() 2024-11-19 19:41:15 +00:00
52ab5004d0 feat(net)!: new api: .on().respond().{status,header{s},body}(_)?, replacing respond(response) 2024-11-19 19:40:14 +00:00
f759884517 feat(net)!: new api: .on().{get,post, etc}(url), replacing .on(method).get(url)
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-19 19:40:02 +00:00
782307a856 fix(net)!: Remove MatchOn
`MatchOn` was left behind from the v1 implementation and isn't used by
anything in the v2 implementation.
2024-11-17 09:15:01 +00:00
0c27a0ee45 feat: re-export http::HeaderMap
Some checks failed
Rust / build (map[name:stable]) (push) Failing after 32s
Rust / build (map[name:nightly]) (push) Failing after 45s
2024-11-17 09:14:39 +00:00
2 changed files with 1 additions and 7 deletions

View file

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

View file

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