在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:hyperium/http开源软件地址:https://github.com/hyperium/http开源编程语言:Rust 100.0%开源软件介绍:HTTPA general purpose library of common HTTP types More information about this crate can be found in the crate documentation. UsageTo use [dependencies]
http = "0.2" Next, add this to your crate: use http::{Request, Response};
fn main() {
// ...
} ExamplesCreate an HTTP request: use http::Request;
fn main() {
let request = Request::builder()
.uri("https://www.rust-lang.org/")
.header("User-Agent", "awesome/1.0")
.body(())
.unwrap();
} Create an HTTP response: use http::{Response, StatusCode};
fn main() {
let response = Response::builder()
.status(StatusCode::MOVED_PERMANENTLY)
.header("Location", "https://www.rust-lang.org/install.html")
.body(())
.unwrap();
} Supported Rust VersionsThis project follows the Tokio MSRV and is currently set to LicenseLicensed under either of
ContributionUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论