artiqwest 0.1.1

A simple client for making http request over Tor with Arti.
Documentation
artiqwest-0.1.1 has been yanked.

Artiquest

Artiquest is a simple HTTP client that routes all requests through the Tor network using the arti_client and hyper. It provides two basic primitives: get and post functions.

Example

use artiqwest::get;
use artiqwest::post;

 #[tokio::main]
 async fn main() {
         // Make a GET request to httpbin.org
         let response = get("https://httpbin.org/get").await.unwrap();
         assert_eq!(response.status(), 200);

         // Make a POST request to a hidden service
         let body = r#"{"test": "testing"}"#;
         let headers = vec![("Content-Type", "application/json")];
         let response = post("http://vpns6exmqmg5znqmgxa5c6rgzpt6imy5yzrbsoszovgfipdjypnchpyd.onion/echo", body, Some(headers)).await.unwrap();
         assert_eq!(response.to_string(), body);
 }