http-req-no-std-win

Crates.iohttp-req-no-std-win
lib.rshttp-req-no-std-win
version0.1.0
sourcesrc
created_at2024-08-07 13:02:16.87617
updated_at2024-08-07 13:02:16.87617
descriptionA library which allows you to send simple http requests using the windows api crate, no_std supported!
homepage
repositoryhttps://github.com/klover-rs/http_req_no_std_win
max_upload_size
id1328407
size14,331
Klover (klover-rs)

documentation

README

What is this project about?

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),
    }
}
Commit count: 0

cargo fmt