{"id":30703131,"url":"https://github.com/dfinity/canhttp","last_synced_at":"2026-04-02T00:59:14.555Z","repository":{"id":304003148,"uuid":"1016725533","full_name":"dfinity/canhttp","owner":"dfinity","description":"Library to make HTTPs outcalls from a canister on the Internet Computer, leveraging the modularity of the tower framework.","archived":false,"fork":false,"pushed_at":"2026-02-17T13:55:39.000Z","size":315,"stargazers_count":4,"open_issues_count":2,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-17T14:16:36.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dfinity.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-09T12:37:43.000Z","updated_at":"2026-02-17T13:40:18.000Z","dependencies_parsed_at":"2025-07-10T21:54:31.814Z","dependency_job_id":"39598cc3-fe2b-476d-876f-880bf8d4ec65","html_url":"https://github.com/dfinity/canhttp","commit_stats":null,"previous_names":["dfinity/canhttp"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/dfinity/canhttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fcanhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fcanhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fcanhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fcanhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfinity","download_url":"https://codeload.github.com/dfinity/canhttp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fcanhttp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29580622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-09-02T16:55:54.186Z","updated_at":"2026-02-18T13:00:45.060Z","avatar_url":"https://github.com/dfinity.png","language":"Rust","readme":"[![Internet Computer portal](https://img.shields.io/badge/InternetComputer-grey?logo=internet%20computer\u0026style=for-the-badge)](https://internetcomputer.org)\n[![DFinity Forum](https://img.shields.io/badge/help-post%20on%20forum.dfinity.org-blue?style=for-the-badge)](https://forum.dfinity.org/)\n[![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg?logo=apache\u0026style=for-the-badge)](LICENSE)\n\n\n# canhttp\n\nLibrary to make [HTTPs outcalls](https://internetcomputer.org/https-outcalls) from a canister on the Internet Computer, leveraging the modularity of the [tower framework](https://rust-lang.guide/guide/learn-async-rust/tower.html).\n\n## Usage\n\nAdd this to your `Cargo.toml` (see [crates.io](https://crates.io/crates/canhttp) for the latest version):\n\n```toml\ncanhttp = \"0.2.1\"\n```\n\nThen, use the library to create an HTTP POST request, as follows:\n```rust\nlet request = http::Request::post(\"https://httpbin.org/anything\")\n    .max_response_bytes(1_000)\n    .header(\"X-Id\", \"42\")\n    .body(\"Hello, World!\".as_bytes().to_vec())\n    .unwrap();\n\nlet response = http_client()\n    .ready()\n    .await\n    .expect(\"Client should be ready\")\n    .call(request)\n    .await\n    .expect(\"Request should succeed\");\n```\n\nComplete examples are available [here](examples) and see also the [Rust documentation](https://docs.rs/canhttp) for more details.\n\n## Cargo Features\n\n### Feature `http`\n\nOffers middleware that transforms a low-level service that uses Candid types into one that uses types from the [http](https://crates.io/crates/http) crate. See the [`http_canister`](examples/http_canister) for a complete example.\n\n### Feature `json`\n\nOffers middleware that transforms a low-level service that transmits bytes into one that transmits JSON payloads. See the [`json_rpc_canister`](examples/json_rpc_canister) for a complete example.\n\n### Feature `multi`\n\nMake multiple calls in parallel and handle their multiple results. See the [`multi_canister`](examples/multi_canister) for a complete example.\n\n## License\n\nThis project is licensed under the [Apache License 2.0](https://opensource.org/licenses/Apache-2.0).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Fcanhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfinity%2Fcanhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Fcanhttp/lists"}