{"id":21577834,"url":"https://github.com/foxzool/bevy_http_client","last_synced_at":"2025-06-12T01:04:55.875Z","repository":{"id":190967768,"uuid":"683660625","full_name":"foxzool/bevy_http_client","owner":"foxzool","description":"A simple HTTP client Bevy Plugin for both native and WASM","archived":false,"fork":false,"pushed_at":"2025-06-03T05:09:45.000Z","size":7390,"stargazers_count":32,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-12T01:04:41.913Z","etag":null,"topics":["bevy","http-client","reqwest","rest"],"latest_commit_sha":null,"homepage":"https://foxzool.github.io/bevy_http_client/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxzool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2023-08-27T09:48:19.000Z","updated_at":"2025-06-03T05:09:14.000Z","dependencies_parsed_at":"2023-08-27T12:51:47.830Z","dependency_job_id":"2817e2dd-cb51-484a-b077-81f8b06ff82a","html_url":"https://github.com/foxzool/bevy_http_client","commit_stats":null,"previous_names":["foxzool/bevy_http_client"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/foxzool/bevy_http_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Fbevy_http_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Fbevy_http_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Fbevy_http_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Fbevy_http_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxzool","download_url":"https://codeload.github.com/foxzool/bevy_http_client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxzool%2Fbevy_http_client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259374732,"owners_count":22847856,"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":["bevy","http-client","reqwest","rest"],"created_at":"2024-11-24T13:08:46.434Z","updated_at":"2025-06-12T01:04:55.851Z","avatar_url":"https://github.com/foxzool.png","language":"Rust","funding_links":[],"categories":["Misc"],"sub_categories":[],"readme":"# bevy_http_client\n\n[![CI](https://github.com/foxzool/bevy_http_client/workflows/CI/badge.svg)](https://github.com/foxzool/bevy_http_client/actions)\n[![Crates.io](https://img.shields.io/crates/v/bevy_http_client)](https://crates.io/crates/bevy_http_client)\n[![Downloads](https://img.shields.io/crates/d/bevy_http_client)](https://crates.io/crates/bevy_http_client)\n[![Documentation](https://docs.rs/bevy_http_client/badge.svg)](https://docs.rs/bevy_http_client)\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/Seldom-SE/seldom_pixel#license)\n\nA simple HTTP client Bevy Plugin for both native and WASM.\n\n## Example\n\n```rust\nuse bevy::{prelude::*, time::common_conditions::on_timer};\nuse bevy_http_client::prelude::*;\nuse serde::Deserialize;\n\n#[derive(Debug, Clone, Deserialize, Default)]\npub struct IpInfo {\n    pub ip: String,\n}\n\nfn main() {\n    let mut app = App::new();\n    app.add_plugins((MinimalPlugins, HttpClientPlugin))\n        .add_systems(Update, (handle_response, handle_error))\n        .add_systems(\n            Update,\n            send_request.run_if(on_timer(std::time::Duration::from_secs(1))),\n        );\n    app.register_request_type::\u003cIpInfo\u003e();\n    app.run();\n}\n\nfn send_request(mut ev_request: EventWriter\u003cTypedRequest\u003cIpInfo\u003e\u003e) {\n    ev_request.send(\n        HttpClient::new()\n            .get(\"https://api.ipify.org?format=json\")\n            .with_type::\u003cIpInfo\u003e(),\n    );\n}\n\n/// consume TypedResponse\u003cIpInfo\u003e events\nfn handle_response(mut events: ResMut\u003cEvents\u003cTypedResponse\u003cIpInfo\u003e\u003e\u003e) {\n    for response in events.drain() {\n        let response: IpInfo = response.into_inner();\n        println!(\"ip info: {:?}\", response);\n    }\n}\n\nfn handle_error(mut ev_error: EventReader\u003cTypedResponseError\u003cIpInfo\u003e\u003e) {\n    for error in ev_error.read() {\n        println!(\"Error retrieving IP: {}\", error.err);\n    }\n}\n\n```\n\n## Supported Versions\n\n| bevy | bevy_http_client |\n|------|------------------|\n| 0.16 | 0.8              |\n| 0.15 | 0.7              |\n| 0.14 | 0.6              |\n| 0.13 | 0.4, 0,5         |\n| 0.12 | 0.3              |\n| 0.11 | 0.1              |\n\n## License\n\nDual-licensed under either:\n\n- [`MIT`](LICENSE-MIT): [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)\n- [`Apache 2.0`](LICENSE-APACHE): [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nAt your option. This means that when using this crate in your game, you may choose which license to use.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as\ndefined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxzool%2Fbevy_http_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxzool%2Fbevy_http_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxzool%2Fbevy_http_client/lists"}