pmvhaven fix
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user