| Crates.io | http-req-no-std-win |
| lib.rs | http-req-no-std-win |
| version | 0.1.0 |
| created_at | 2024-08-07 13:02:16.87617+00 |
| updated_at | 2024-08-07 13:02:16.87617+00 |
| description | A library which allows you to send simple http requests using the windows api crate, no_std supported! |
| homepage | |
| repository | https://github.com/klover-rs/http_req_no_std_win |
| max_upload_size | |
| id | 1328407 |
| size | 14,331 |
http_req_no_std_win is as the name already says, a library which is no_std compatible and made for windows the goal of this project is to eleminate large binary sizes by using no_std, the library is kept relatively simple
example usage
use http_req_no_std_win::request::{ClientBuilder, Request, RequestType};
fn main() {
let body = r#"{"name":"morpheus","job":"jobless"}"#.as_bytes().to_vec();
let client_builder = ClientBuilder::new()
.url("https://reqres.in/api/users/2")
.request_type(RequestType::GET)
//.body(body)
.build();
let request = Request { client: client_builder };
match request.send() {
Ok(response) => println!("Response: {:?}", response),
Err(error) => println!("Request failed with error code: {:?}", error),
}
}