{"id":16677835,"url":"https://github.com/jaemk/mini_http","last_synced_at":"2025-08-14T11:35:53.911Z","repository":{"id":66210370,"uuid":"110784426","full_name":"jaemk/mini_http","owner":"jaemk","description":"mini async http server","archived":false,"fork":false,"pushed_at":"2018-02-03T01:41:19.000Z","size":38,"stargazers_count":2,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:24:13.949Z","etag":null,"topics":["asynchronous","http","http-server","mio"],"latest_commit_sha":null,"homepage":null,"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/jaemk.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}},"created_at":"2017-11-15T04:41:14.000Z","updated_at":"2023-01-08T09:03:58.000Z","dependencies_parsed_at":"2023-02-23T23:15:22.652Z","dependency_job_id":null,"html_url":"https://github.com/jaemk/mini_http","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fmini_http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fmini_http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fmini_http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fmini_http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaemk","download_url":"https://codeload.github.com/jaemk/mini_http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248113322,"owners_count":21049824,"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":["asynchronous","http","http-server","mio"],"created_at":"2024-10-12T13:27:38.622Z","updated_at":"2025-04-09T21:24:25.365Z","avatar_url":"https://github.com/jaemk.png","language":"Rust","readme":"# mini_http\n[![Build Status](https://travis-ci.org/jaemk/mini_http.svg?branch=master)](https://travis-ci.org/jaemk/mini_http)\n\n**Note:** This project is a work in progress and shouldn't be used in any critical production environment.\n\n\u003e A basic asynchronous\u0026#42; http server using [`mio`](https://docs.rs/mio)\n\n\u0026#42;While network IO is performed asynchronously, handler functions are executed synchronously in a thread pool.\n\n## Usage\n\nSee [`examples`](https://github.com/jaemk/mini_http/tree/master/examples)\n\n```rust\nextern crate mini_http;\n\nfn run() -\u003e Result\u003c(), Box\u003cstd::error::Error\u003e\u003e {\n    mini_http::Server::new(\"127.0.0.1:3000\")?\n        .start(|request| {\n            println!(\"{:?}\", std::str::from_utf8(request.body()));\n            let resp = if request.body().len() \u003e 0 {\n                request.body().to_vec()\n            } else {\n                b\"hello!\".to_vec()\n            };\n            mini_http::Response::builder()\n                .status(200)\n                .header(\"X-What-Up\", \"Nothin\")\n                .body(resp)\n                .unwrap()\n        })?;\n    Ok(())\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaemk%2Fmini_http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaemk%2Fmini_http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaemk%2Fmini_http/lists"}