{"id":50557980,"url":"https://github.com/heaths/reqwest-timeouts","last_synced_at":"2026-06-04T09:01:00.633Z","repository":{"id":352105220,"uuid":"1213864168","full_name":"heaths/reqwest-timeouts","owner":"heaths","description":"Timeout tests for reqwest::Client","archived":false,"fork":false,"pushed_at":"2026-04-17T21:27:36.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-17T23:31:02.420Z","etag":null,"topics":["reqwest"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heaths.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-17T21:02:02.000Z","updated_at":"2026-04-17T21:27:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/heaths/reqwest-timeouts","commit_stats":null,"previous_names":["heaths/reqwest-timeouts"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/heaths/reqwest-timeouts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heaths%2Freqwest-timeouts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heaths%2Freqwest-timeouts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heaths%2Freqwest-timeouts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heaths%2Freqwest-timeouts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heaths","download_url":"https://codeload.github.com/heaths/reqwest-timeouts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heaths%2Freqwest-timeouts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33897568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["reqwest"],"created_at":"2026-06-04T09:00:59.918Z","updated_at":"2026-06-04T09:01:00.621Z","avatar_url":"https://github.com/heaths.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reqwest-timeouts\n\nA test harness for exploring\n[`reqwest::ClientBuilder`](https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html)\ntimeout settings. A Rust CLI drives requests while an Express.js server\nsimulates slow or stalled responses.\n\n## Timeouts under test\n\n| Timeout     | `ClientBuilder` method | What it controls                                         |\n| ----------- | ---------------------- | -------------------------------------------------------- |\n| **Total**   | `timeout()`            | End-to-end deadline from connect through response body   |\n| **Read**    | `read_timeout()`       | Per-read idle timeout; resets after each successful read |\n| **Connect** | `connect_timeout()`    | TCP connect phase only                                   |\n\nOther `ClientBuilder` timeouts (`pool_idle_timeout`, TCP keep-alive, HTTP/2\nkeep-alive) are not easily observable from a test client, so they are excluded.\n\n## How it works\n\n```text\n┌────────────┐         ┌──────────────┐\n│  Rust CLI  │──HTTP──▶│ Express.js   │\n│  (reqwest) │         │ test server  │\n└────────────┘         └──────────────┘\n```\n\nThe **Express server** exposes endpoints whose latency is controlled via query\nparameters:\n\n- `/delay?seconds=N` — waits _N_ seconds before responding (tests total\n  timeout).\n- `/slow-body?chunk_delay=N\u0026chunks=M` — sends _M_ chunks with _N_-second pauses\n  (tests read timeout).\n- `/health` — instant response for sanity checks and connect-timeout success.\n\nThe **Rust CLI** (built with `clap`) has one subcommand per timeout. Each\nsubcommand configures a `ClientBuilder`, makes a request, and prints `SUCCESS`\nor `FAILED` with elapsed time.\n\n## Quick start\n\n```bash\nnpm install        # install Express\ncargo build        # build the CLI\n\nnpm start \u0026        # start the server on :3000\n\n# success: 2 s timeout, 1 s server delay\ncargo run -q -- timeout --timeout 2 --server-delay 1\n\n# failure: 1 s timeout, 3 s server delay\ncargo run -q -- timeout --timeout 1 --server-delay 3\n```\n\nSee [AGENTS.md](AGENTS.md) for the full test plan covering every scenario.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup, formatting, and contribution\nguidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheaths%2Freqwest-timeouts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheaths%2Freqwest-timeouts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheaths%2Freqwest-timeouts/lists"}