{"id":15138406,"url":"https://github.com/oscartbeaumont/httpz","last_synced_at":"2025-12-30T05:17:54.570Z","repository":{"id":60041664,"uuid":"519718871","full_name":"oscartbeaumont/httpz","owner":"oscartbeaumont","description":"Code once, support every Rust webserver!","archived":true,"fork":false,"pushed_at":"2023-12-30T06:07:53.000Z","size":100,"stargazers_count":28,"open_issues_count":18,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-01T01:07:12.825Z","etag":null,"topics":["actix-web","axum","http","httpz","poem","rocket","rust","rust-http","warp"],"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/oscartbeaumont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["oscartbeaumont"],"custom":["https://paypal.me/oscartbeaumont"]}},"created_at":"2022-07-31T08:25:28.000Z","updated_at":"2024-08-07T20:13:06.000Z","dependencies_parsed_at":"2023-12-30T07:43:19.789Z","dependency_job_id":"95c458df-0ee8-4965-8ad8-f6d6b1d3d09a","html_url":"https://github.com/oscartbeaumont/httpz","commit_stats":{"total_commits":43,"total_committers":4,"mean_commits":10.75,"dds":0.09302325581395354,"last_synced_commit":"2afc85de7c05b5d7d9b74c5439baf5a952162b15"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscartbeaumont%2Fhttpz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscartbeaumont%2Fhttpz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscartbeaumont%2Fhttpz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscartbeaumont%2Fhttpz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oscartbeaumont","download_url":"https://codeload.github.com/oscartbeaumont/httpz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234597574,"owners_count":18857980,"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-web","axum","http","httpz","poem","rocket","rust","rust-http","warp"],"created_at":"2024-09-26T07:23:23.003Z","updated_at":"2025-09-29T06:31:35.426Z","avatar_url":"https://github.com/oscartbeaumont.png","language":"Rust","funding_links":["https://github.com/sponsors/oscartbeaumont","https://paypal.me/oscartbeaumont"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003ehttpz\u003c/h1\u003e\n    \u003cp\u003e\u003cb\u003eCode once, support every Rust webserver!\u003c/b\u003e\u003c/p\u003e\n    \u003ca href=\"https://discord.gg/JgqH8b4ycw\"\u003e\u003cimg src=\"https://img.shields.io/discord/1011665225809924136?style=flat-square\" alt=\"Discord\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/httpz\"\u003e\u003cimg src=\"https://img.shields.io/crates/d/httpz?style=flat-square\" alt=\"Crates.io\"\u003e\u003c/a\u003e\n    \u003ca href=\"/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/crates/l/httpz?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\nThis project is a 🚧 work in progress 🚧. Currently it is designed around the goals of [rspc](https://rspc.otbeaumont.me) but feel free to reach to me if you want to collaborate on using it in your own project.\n\n## Usage\n\n```rust\n    // Define your a single HTTP handler which is supported by all major Rust webservers.\nlet endpoint = GenericEndpoint::new(\n    // Set URL prefix\n    \"/\",\n    // Set the supported HTTP methods\n    [Method::GET, Method::POST],\n    // Define the handler function\n    |_req: Request| async move {\n        Ok(Response::builder()\n            .status(StatusCode::OK)\n            .header(\"Content-Type\", \"text/html\")\n            .body(b\"Hello httpz World!\".to_vec())?)\n    },\n);\n\n// Attach your generic endpoint to Axum\nlet app = axum::Router::new().route(\"/\", endpoint.axum());\n\n// Attach your generic endpoint to Actix Web\nHttpServer::new({\n    let endpoint = endpoint.actix();\n    move || App::new().service(web::scope(\"/prefix\").service(endpoint.mount()))\n});\n\n// and so on...\n```\n\nCheck out the rest of the [examples](/examples)!\n## Features\n\n - Write your HTTP handler once and support [Axum](https://github.com/tokio-rs/axum), [Actix Web](https://actix.rs/), [Poem](https://github.com/poem-web/poem), [Rocket](https://rocket.rs), [Warp](https://github.com/seanmonstar/warp) and more.\n - Support for websockets on compatible webservers.\n\n## Projects using httpz\n\nhttpz is primarily designed to make life easier for library authors. It allows a library author to write and test a HTTP endpoint once and know it will work for all major Rust HTTP servers.\n\nLibraries using httpz:\n\n - [rspc](https://github.com/oscartbeaumont/rspc)\n\nIf you are interested in using httpz and have questions jump in [the Discord](https://discord.gg/4V9M5sksw8)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscartbeaumont%2Fhttpz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscartbeaumont%2Fhttpz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscartbeaumont%2Fhttpz/lists"}