pmvhaven fix

This commit is contained in:
Simon
2025-10-12 19:23:16 +00:00
parent dcb5148da6
commit 09c06df163
2 changed files with 10 additions and 29 deletions

View File

@@ -83,7 +83,7 @@ impl Requester {
request.send().await
}
pub async fn post<S>(&mut self, url: &str, data: &S) -> Result<Response, wreq::Error>
pub async fn post<S>(&mut self, url: &str, data: &S, headers: Vec<(String, String)>) -> Result<Response, wreq::Error>
where
S: Serialize + ?Sized,
{
@@ -96,6 +96,11 @@ impl Requester {
let mut request = client.post(url).version(Version::HTTP_11).json(data);
// Set custom headers
for (key, value) in headers.iter() {
request = request.header(key, value);
}
if self.proxy {
if let Ok(proxy_url) = env::var("BURP_URL") {
let proxy = Proxy::all(&proxy_url).unwrap();