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

ZuckGate

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

8 releases

0.1.8 Dec 8, 2024
0.1.7 Dec 8, 2024
0.1.4 Nov 26, 2024

#1767 in Network programming

Download history 300/week @ 2024-11-22 121/week @ 2024-11-29 387/week @ 2024-12-06 38/week @ 2024-12-13 5/week @ 2024-12-20 1/week @ 2024-12-27 2/week @ 2025-01-03 7/week @ 2025-01-10

342 downloads per month
Used in 3 crates (via rusty-scrap)

MIT license

17KB
382 lines

Rust Crate: Ask

The Bolt crate provides a strongly typed and 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)
      .connection(ZuckGate::Connections::Close)
      .ask();


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

Dependencies

~0.1–9MB
~95K SLoC