Module http

Module http 

Source
Expand description

HTTP scraping adapter with anti-bot capabilities HTTP scraping adapter with anti-bot features

Implements the ScrapingService port using reqwest with:

  • Realistic browser headers and User-Agent rotation
  • Cookie jar persistence across requests in a session
  • Exponential backoff retry (up to 3 attempts)
  • Configurable timeouts
  • Optional proxy support

§Example

use stygian_graph::adapters::http::{HttpAdapter, HttpConfig};
use stygian_graph::ports::{ScrapingService, ServiceInput};
use serde_json::json;

let adapter = HttpAdapter::with_config(HttpConfig::default());
let input = ServiceInput {
    url: "https://httpbin.org/get".to_string(),
    params: json!({}),
};
// let result = adapter.execute(input).await.unwrap();

Structs§

HttpAdapter
HTTP client adapter with anti-bot features.
HttpConfig
Configuration for the HTTP adapter