| Crates.io | bt_http_utils |
| lib.rs | bt_http_utils |
| version | 0.7.2 |
| created_at | 2025-02-01 23:57:28.143607+00 |
| updated_at | 2026-01-12 17:36:37.158052+00 |
| description | A simple HTTP wrapper to simplify POST and GET calls. Default headers with set and get headers. Support cookies. Request generic function for GET, POST, PUT, PATCH, and DELETE. |
| homepage | https://github.com/bachuetech/bt_http_utils |
| repository | https://github.com/bachuetech/bt_http_utils |
| max_upload_size | |
| id | 1539088 |
| size | 128,158 |
BT HTTP UTILS
A simple HTTP wrapper to simplify POST and GET calls.
let http_client = HttpClient::new(false, false);
let resp_get = http_client.get(&url, None).await;
let resp_post_txt = http_client.post(&url, None, body, ContentType::TEXT).await;
let resp_post_json = http_client.post(&url, None, body, ContentType::JSON).await;
///Fields available
resp.unwrap().body;
resp.unwrap().header;
resp.unwrap().is_error();
resp.unwrap().status_code;
GPL-3.0-only