preq 0.1.20

ipv6 proxyed reqwest
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use bytes::Bytes;
use preq1::post_form;
use reqwest::IntoUrl;

static mut N: usize = 0;

pub struct Proxy;

impl Proxy {
  pub async fn post_form(
    url: impl IntoUrl,
    form: impl IntoIterator<Item = (impl AsRef<str>, impl AsRef<str>)>,
  ) -> reqwest::Result<Bytes> {
    unsafe { (N, _) = N.overflowing_add(1) };
    post_form(unsafe { N }, &reqwest_client::PROXY, url, form).await
  }
}