{"id":15662403,"url":"https://github.com/justjavac/rust_tinyget","last_synced_at":"2025-04-13T09:34:37.328Z","repository":{"id":48091922,"uuid":"333654376","full_name":"justjavac/rust_tinyget","owner":"justjavac","description":"Tiny HTTP client for GET","archived":false,"fork":false,"pushed_at":"2024-05-08T02:11:21.000Z","size":55,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-10T11:42:44.869Z","etag":null,"topics":["http","http-client","https","rust","rust-crate","rust-lang","rust-library","tiny"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tinyget","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/justjavac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING-minreq","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}},"created_at":"2021-01-28T05:22:14.000Z","updated_at":"2024-12-02T07:04:07.000Z","dependencies_parsed_at":"2024-10-23T07:49:28.154Z","dependency_job_id":"f65138af-a022-4c8e-baa7-570caac5dd82","html_url":"https://github.com/justjavac/rust_tinyget","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.045454545454545414","last_synced_commit":"aff45553b82464fe64c3c4df2456d85b92ed0d02"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Frust_tinyget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Frust_tinyget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Frust_tinyget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Frust_tinyget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justjavac","download_url":"https://codeload.github.com/justjavac/rust_tinyget/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245761280,"owners_count":20667895,"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":["http","http-client","https","rust","rust-crate","rust-lang","rust-library","tiny"],"created_at":"2024-10-03T13:32:19.383Z","updated_at":"2025-04-13T09:34:37.322Z","avatar_url":"https://github.com/justjavac.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinyget\n\n[![ci](https://github.com/justjavac/rust_tinyget/actions/workflows/ci.yml/badge.svg)](https://github.com/justjavac/rust_tinyget/actions/workflows/ci.yml)\n[![Crate](https://img.shields.io/crates/v/tinyget.svg)](https://crates.io/crates/tinyget)\n[![Documentation](https://docs.rs/tinyget/badge.svg)](https://docs.rs/tinyget)\n![License](https://img.shields.io/crates/l/tinyget.svg)\n\n\u003e A tiny fork of [minreq](https://crates.io/crates/minreq).\n\nA simple, minimal-dependency HTTP client for Rust. It provides a clean and intuitive API for making HTTP requests with minimal overhead.\n\n## Features\n\n- Simple and intuitive API\n- Minimal dependencies\n- Optional HTTPS support via native-tls\n- Optional timeout support\n- Small binary size\n\n## Quick Start\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntinyget = \"1.1\"\n```\n\nBasic usage:\n\n```rust\nuse tinyget;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Simple GET request\n    let response = tinyget::get(\"https://httpbin.org/anything\").send()?;\n    println!(\"Response: {}\", response.as_str()?);\n\n    // With timeout\n    let response = tinyget::get(\"https://httpbin.org/anything\")\n        .with_timeout(5)\n        .send()?;\n    println!(\"Response: {}\", response.as_str()?);\n\n    Ok(())\n}\n```\n\n## Advanced Usage\n\n### HTTPS Support\n\nTo enable HTTPS support, add the `https` feature:\n\n```toml\n[dependencies]\ntinyget = { version = \"1.1\", features = [\"https\"] }\n```\n\n### Timeout Support\n\nTo enable timeout support, add the `timeout` feature:\n\n```toml\n[dependencies]\ntinyget = { version = \"1.1\", features = [\"timeout\"] }\n```\n\nYou can set timeout in two ways:\n\n1. Per-request timeout:\n```rust\nlet response = tinyget::get(\"https://httpbin.org/anything\")\n    .with_timeout(5)\n    .send()?;\n```\n\n2. Global timeout via environment variable:\n```bash\nTINYGET_TIMEOUT=5 cargo run\n```\n\n### Custom Headers\n\n```rust\nlet response = tinyget::get(\"https://httpbin.org/anything\")\n    .with_header(\"User-Agent\", \"tinyget/1.1\")\n    .send()?;\n```\n\n## Binary Size\n\nrustc 1.76.0 (07dca489a 2024-02-04)\n\n|                | debug              | release        |\n| -------------- | ------------------ | -------------- |\n| [**hello**][1] |   424,896          | 266,547        |\n| [**http**][2]  |   772,416(+348k)   | 319,856(+53k)  |\n| [**https**][3] | 1,101,512(+677k)   | 344,432(+78k)  |\n\n[1]: ./examples/hello.rs\n[2]: ./examples/http.rs\n[3]: ./examples/https.rs\n\n## Size Comparison\n\n|             |      http |     https |\n| ----------- | --------: | --------: |\n| **tinyget** |   283,920 |   319,632 |\n| **minreq**  |   300,328 |   959,744 |\n| **ureq**    |   695,632 | 1,371,368 |\n| **reqwest** | 1,639,496 | 1,675,032 |\n\n## Examples\n\nCheck out the [examples](./examples) directory for more usage examples:\n\n- [Basic HTTP request](./examples/http.rs)\n- [HTTP request with timeout](./examples/http_timeout.rs)\n- [HTTPS request](./examples/https.rs)\n- [HTTPS request with timeout](./examples/https_timeout.rs)\n- [Iterator example](./examples/iterator.rs)\n\n## License\n\nThis crate is distributed under the terms of the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustjavac%2Frust_tinyget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustjavac%2Frust_tinyget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustjavac%2Frust_tinyget/lists"}