pub struct HttpClient { /* private fields */ }Expand description
Thin wrapper around reqwest::Client with WAF evasion & size capping.
Implementations§
Source§impl HttpClient
impl HttpClient
pub fn new(config: &Config) -> ScannerResult<Self>
Sourcepub fn with_credential(self, cred: Arc<LiveCredential>) -> Self
pub fn with_credential(self, cred: Arc<LiveCredential>) -> Self
Attach a live credential to this client for auth flow injection.
pub fn cache_spec(&self, url: &str, body: &str)
pub fn get_cached_spec(&self, url: &str) -> Option<String>
pub fn runtime_metrics(&self) -> HttpRuntimeMetrics
Sourcepub async fn request(
&self,
method: Method,
url: &str,
extra_headers: Option<HeaderMap>,
body: Option<Value>,
) -> Result<HttpResponse, CapturedError>
pub async fn request( &self, method: Method, url: &str, extra_headers: Option<HeaderMap>, body: Option<Value>, ) -> Result<HttpResponse, CapturedError>
Send a request, applying WAF evasion delays + rotating headers.
pub async fn get(&self, url: &str) -> Result<HttpResponse, CapturedError>
Sourcepub async fn get_burst(&self, url: &str) -> Result<HttpResponse, CapturedError>
pub async fn get_burst(&self, url: &str) -> Result<HttpResponse, CapturedError>
GET request for burst probes: bypasses host-delay and retry orchestration to exercise server-side rate limiting under near-simultaneous load.
Sourcepub async fn get_with_headers(
&self,
url: &str,
extra: &[(String, String)],
) -> Result<HttpResponse, CapturedError>
pub async fn get_with_headers( &self, url: &str, extra: &[(String, String)], ) -> Result<HttpResponse, CapturedError>
GET with extra request headers specified as [(name, value)] pairs.
Sourcepub async fn get_with_headers_burst(
&self,
url: &str,
extra: &[(String, String)],
) -> Result<HttpResponse, CapturedError>
pub async fn get_with_headers_burst( &self, url: &str, extra: &[(String, String)], ) -> Result<HttpResponse, CapturedError>
Headered GET for burst probes: bypasses host-delay and retries.
Sourcepub async fn get_with_headers_no_redirect(
&self,
url: &str,
extra: &[(String, String)],
) -> Result<HttpResponse, CapturedError>
pub async fn get_with_headers_no_redirect( &self, url: &str, extra: &[(String, String)], ) -> Result<HttpResponse, CapturedError>
GET with extra headers while forcing redirect policy to none.
This keeps transport accounting/evasion behavior consistent with normal
requests while allowing scanners to inspect 30x Location responses.
pub async fn head(&self, url: &str) -> Result<HttpResponse, CapturedError>
pub async fn options( &self, url: &str, extra: Option<HeaderMap>, ) -> Result<HttpResponse, CapturedError>
pub async fn post_json( &self, url: &str, body: &Value, ) -> Result<HttpResponse, CapturedError>
Sourcepub async fn get_without_auth(
&self,
url: &str,
) -> Result<HttpResponse, CapturedError>
pub async fn get_without_auth( &self, url: &str, ) -> Result<HttpResponse, CapturedError>
GET request without the live credential (used for unauthenticated comparison in IDOR checks).
pub async fn method_probe( &self, method: &str, url: &str, ) -> Result<HttpResponse, CapturedError>
pub async fn save_session(&self) -> ScannerResult<()>
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more