Crates.io | bt_http_utils |
lib.rs | bt_http_utils |
version | |
source | src |
created_at | 2025-02-01 23:57:28.143607 |
updated_at | 2025-02-03 17:25:29.458928 |
description | A simple HTTP wrapper to simplify POST and GET calls. Default headers with set and get headers. |
homepage | https://github.com/bachuetech/bt_http_utils |
repository | https://github.com/bachuetech/bt_http_utils |
max_upload_size | |
id | 1539088 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
BT HTTP UTILS
A simple HTTP wrapper to simplify POST and GET calls.
let http_client = HttpClient::new(false);
let resp_get = http_client.get(&url).await;
let resp_post_txt = http_client.post(&url, body, ContentType::TEXT).await;
let resp_post_json = http_client.post(&url, body, ContentType::JSON).await;
///Fields available
resp.unwrap().body;
resp.unwrap().header;
resp.unwrap().is_error();
resp.unwrap().status_code;
GPL-3.0-only