{"id":19636141,"url":"https://github.com/kuy/actix-delay","last_synced_at":"2025-04-28T08:32:02.782Z","repository":{"id":57479022,"uuid":"239683612","full_name":"kuy/actix-delay","owner":"kuy","description":"Simulates a delayed response for actix-web","archived":false,"fork":false,"pushed_at":"2020-02-11T06:01:02.000Z","size":6,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T14:03:06.499Z","etag":null,"topics":["actix","actix-web","middleware","rust","testing"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"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/kuy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-11T05:27:05.000Z","updated_at":"2020-12-21T17:00:13.000Z","dependencies_parsed_at":"2022-09-18T05:56:43.337Z","dependency_job_id":null,"html_url":"https://github.com/kuy/actix-delay","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuy%2Factix-delay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuy%2Factix-delay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuy%2Factix-delay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuy%2Factix-delay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuy","download_url":"https://codeload.github.com/kuy/actix-delay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224102633,"owners_count":17256219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["actix","actix-web","middleware","rust","testing"],"created_at":"2024-11-11T12:28:23.864Z","updated_at":"2024-11-11T12:28:31.861Z","avatar_url":"https://github.com/kuy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# actix-delay\n\n[![crates.io](https://img.shields.io/crates/v/actix-delay.svg)](https://crates.io/crates/actix-delay)\n[![build](https://github.com/kuy/actix-delay/workflows/build/badge.svg)](https://github.com/kuy/actix-delay/actions)\n\nThis crate provides a middleware of [actix-web](https://actix.rs/) which simulates a delayed/slow response for testing purpose.\n\n## Usage\n\nAdd `actix-delay` to `dependencies` section in your project.\n\n```toml\n[dependencies]\nactix-delay = \"0.1\"\n```\n\nAdd `actix_delay::middleware::Delay` as middleware.\n\n```rust\nuse actix_delay::middleware::Delay;\n\nasync fn main() -\u003e std::io::Result\u003c()\u003e {\n    HttpServer::new(|| {\n        App::new()\n            .wrap(Delay::new(3000))\n            .service(resource(\"/\").to(|| async { \"Hello!\" }))\n    })\n    .bind(\"127.0.0.1:8080\")?\n    .run()\n    .await\n}\n```\n\nSee [full example](https://github.com/kuy/actix-delay/blob/master/examples/simple.rs).\n\n## Examples\n\n- [simple](https://github.com/kuy/actix-delay/blob/master/examples/simple.rs): `cargo run --example simple`\n\n## License\n\n[MIT](https://github.com/kuy/actix-delay/blob/master/LICENSE)\n\n## Author\n\nYuki Kodama / [@kuy](https://twitter.com/kuy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuy%2Factix-delay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuy%2Factix-delay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuy%2Factix-delay/lists"}