https://github.com/h0llyw00dzz/rollingrequests
RollingRequests is a Rust library for handling and executing HTTP requests with concurrency control. It allows you to create and manage HTTP requests efficiently, with a specified limit on simultaneous requests.
https://github.com/h0llyw00dzz/rollingrequests
Last synced: 6 months ago
JSON representation
RollingRequests is a Rust library for handling and executing HTTP requests with concurrency control. It allows you to create and manage HTTP requests efficiently, with a specified limit on simultaneous requests.
- Host: GitHub
- URL: https://github.com/h0llyw00dzz/rollingrequests
- Owner: H0llyW00dzZ
- License: bsd-3-clause
- Created: 2025-04-03T04:34:23.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-04-08T04:12:17.000Z (6 months ago)
- Last Synced: 2025-04-12T12:13:17.622Z (6 months ago)
- Language: Rust
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RollingRequests
RollingRequests is a Rust library designed for handling and executing HTTP requests with concurrency control. It allows you to efficiently manage HTTP requests with a specified limit on simultaneous executions.
>[!NOTE]
> This repository is still a work in progress and not yet released.## Features
- **Create and Manage Requests**: Easily create HTTP requests with customizable parameters.
- **Concurrent Execution**: Execute multiple requests concurrently with a configurable limit.
- **Flexible Request Management**: Add, execute, and clear requests seamlessly.## Usage
```rust
use rollingrequests::rolling::RollingRequestsBuilder;
use rollingrequests::request::Request;
use reqwest::Method;
use tokio;#[tokio::main]
async fn main() {
let mut rolling_requests = RollingRequestsBuilder::new()
.simultaneous_limit(2)
.build();let url = "http://example.com";
// Add requests to the queue
for _ in 0..5 {
let request = Request::new(url, Method::GET);
rolling_requests.add_request(request);
}// Execute requests
let responses = rolling_requests.execute_requests().await;
for response in responses {
match response {
Ok(res) => println!("Response: {:?}", res),
Err(err) => eprintln!("Error: {:?}", err),
}
}
}
```## License
This project is licensed under the BSD 3-Clause License. See the [LICENSE](LICENSE) file for details.