#post-requests #http-request #header #payload #interface #configurable #content

bin+lib ZuckGate

Simple interface for making TCP-based HTTP requests in Rust. It supports both GET and POST requests with configurable headers and payloads.

4 releases

new 0.1.4 Nov 26, 2024
0.1.3 Nov 26, 2024
0.1.2 Nov 26, 2024
0.1.1 Nov 25, 2024

#1784 in Network programming

36 downloads per month

MIT license

13KB
253 lines

Rust Crate: Ask

The Bolt crate provides a simple interface for making TCP-based HTTP requests in Rust. It supports both GET and POST requests with configurable headers and payloads.


Example: POST Request

This example demonstrates how to make a POST request with JSON content:


  let content = r#"{
      "key": "value"
  }"#;

  let ask = ZuckGate::new()
      .url("https://example.com/api")
      .post()
      .content_type("application/json")
      .content(&content)
      .ask();


  let ask = ZuckGate::new().url("").get().ask();

Dependencies

~0.1–8.5MB
~90K SLoC