{"id":15383303,"url":"https://github.com/neolegends/tokio-request","last_synced_at":"2025-06-12T14:38:32.432Z","repository":{"id":70011334,"uuid":"67504364","full_name":"NeoLegends/tokio-request","owner":"NeoLegends","description":"An asynchronous HTTP client library for Rust","archived":false,"fork":false,"pushed_at":"2017-02-19T10:39:13.000Z","size":43,"stargazers_count":13,"open_issues_count":4,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T19:18:05.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/NeoLegends.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-09-06T12:04:35.000Z","updated_at":"2024-04-09T16:49:41.000Z","dependencies_parsed_at":"2023-02-25T16:45:41.861Z","dependency_job_id":null,"html_url":"https://github.com/NeoLegends/tokio-request","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NeoLegends/tokio-request","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeoLegends%2Ftokio-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeoLegends%2Ftokio-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeoLegends%2Ftokio-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeoLegends%2Ftokio-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeoLegends","download_url":"https://codeload.github.com/NeoLegends/tokio-request/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeoLegends%2Ftokio-request/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259483686,"owners_count":22864996,"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":[],"created_at":"2024-10-01T14:36:49.497Z","updated_at":"2025-06-12T14:38:32.421Z","avatar_url":"https://github.com/NeoLegends.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tokio-request\n\n\n[![Travis](https://img.shields.io/travis/NeoLegends/tokio-request.svg?maxAge=2592000)](https://travis-ci.org/NeoLegends/tokio-request)\n[![GitHub issues](https://img.shields.io/github/issues/NeoLegends/tokio-request.svg?maxAge=2592000)](https://github.com/NeoLegends/tokio-request/issies)\n[![GitHub issues](https://img.shields.io/github/issues-closed-raw/NeoLegends/tokio-request.svg?maxAge=2592000)](https://github.com/NeoLegends/tokio-request/issues)\n[![Coveralls](https://img.shields.io/coveralls/NeoLegends/tokio-request.svg?maxAge=2592000)](https://coveralls.io/github/NeoLegends/tokio-request?branch=master)\n\nAn asynchronous HTTP client library for Rust\n\nAs this isn't on crates.io as of now, add the following to your Cargo.toml:\n```toml\n[dependencies]\ntokio-request = { git = \"https://github.com/NeoLegends/tokio-request\" }\n```\n\nand the following to your crate's root file:\n```rust\nextern crate tokio_request;\n```\n\n## Examples\nAsynchronously send an HTTP request on the specified loop:\n\n```rust\nuse tokio_core::reactor::Core;\nuse tokio_request::str::get;\nuse url::Url;\n\nlet mut evloop = Core::new().unwrap();\nlet future = get(\"https://httpbin.org/get\")\n                .header(\"User-Agent\", \"tokio-request\")\n                .param(\"Hello\", \"This is Rust\")\n                .param(\"Hello2\", \"This is also from Rust\")\n                .send(evloop.handle());\nlet result = evloop.run(future).expect(\"HTTP Request failed!\");\nprintln!(\n    \"Site answered with status code {} and body\\n{}\",\n    result.status_code(),\n    result.body_str().unwrap_or(\"\u003cNo response body\u003e\")\n);\n```\n\nPOST some JSON to an API (data must be serializable):\n\n```rust\nuse tokio_core::reactor::Core;\nuse tokio_request::str::post;\n\nlet mut evloop = Core::new().unwrap();\nlet future = post(\"https://httpbin.org/post\")\n                .json(\u0026Data { a: 10, b: 15 })\n                .send(evloop.handle());\nlet result = evloop.run(future).expect(\"HTTP Request failed!\");\nprintln!(\n    \"Site answered with status code {} and body\\n{}\",\n    result.status_code(),\n    result.body_str().unwrap_or(\"\u003cNo response body\u003e\")\n);\n```\n\n## Caveats\nRight now the focus for this library is on interacting with REST\nAPIs that talk JSON, so this library is buffering the entire response\ninto memory. This means it is not recommended for downloading large\nfiles from the internet. Streaming request / response bodies will be\nadded at a later stage when implementation and API details have been\nfigured out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneolegends%2Ftokio-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneolegends%2Ftokio-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneolegends%2Ftokio-request/lists"}