#http-post #http #client #header #calls #set

bt_http_utils

A simple HTTP wrapper to simplify POST and GET calls. Default headers with set and get headers.

3 unstable releases

new 0.2.1 Feb 12, 2025
0.2.0 Feb 3, 2025
0.1.0 Feb 1, 2025

#193 in HTTP client

Download history 155/week @ 2025-01-28 101/week @ 2025-02-04 147/week @ 2025-02-11

403 downloads per month

GPL-3.0-only

17KB
112 lines

Project Title

BT HTTP UTILS

Description

A simple HTTP wrapper to simplify POST and GET calls.

Usage

    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;

Version History

  • 0.1.0
    • Initial Release
  • 0.2.0
    • Include set and get default headers
  • 0.2.1
    • Fix typos

License

GPL-3.0-only

Dependencies

~7–20MB
~262K SLoC