hanime updates

This commit is contained in:
Simon
2025-10-17 08:19:32 +00:00
parent 09c06df163
commit a0e0a8e4b1
5 changed files with 95 additions and 28 deletions

View File

@@ -83,6 +83,29 @@ impl Requester {
request.send().await
}
pub async fn get_raw_with_headers(&mut self, url: &str, headers: Vec<(String, String)>) -> Result<Response, wreq::Error> {
let client = Client::builder()
.cert_verification(false)
.emulation(Emulation::Firefox136)
.cookie_store(true)
.build()
.expect("Failed to create HTTP client");
let mut request = client.get(url).version(Version::HTTP_11);
if self.proxy {
if let Ok(proxy_url) = env::var("BURP_URL") {
let proxy = Proxy::all(&proxy_url).unwrap();
request = request.proxy(proxy);
}
}
// Set custom headers
for (key, value) in headers.iter() {
request = request.header(key, value);
}
request.send().await
}
pub async fn post<S>(&mut self, url: &str, data: &S, headers: Vec<(String, String)>) -> Result<Response, wreq::Error>
where
S: Serialize + ?Sized,