{"id":25408182,"url":"https://github.com/ibnz36/http","last_synced_at":"2025-04-13T11:59:17.656Z","repository":{"id":143858348,"uuid":"410525169","full_name":"ibnz36/http","owner":"ibnz36","description":"A (very) simple library for parsing http requests and generating responses in rust. ","archived":false,"fork":false,"pushed_at":"2022-01-19T10:06:09.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T11:59:14.589Z","etag":null,"topics":["http","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibnz36.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":"2021-09-26T10:52:06.000Z","updated_at":"2023-10-26T20:53:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4e97e00-727a-4117-99b1-960591a86045","html_url":"https://github.com/ibnz36/http","commit_stats":null,"previous_names":["ibnz36/http"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnz36%2Fhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnz36%2Fhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnz36%2Fhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibnz36%2Fhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibnz36","download_url":"https://codeload.github.com/ibnz36/http/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710436,"owners_count":21149188,"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","rust"],"created_at":"2025-02-16T07:20:33.239Z","updated_at":"2025-04-13T11:59:17.633Z","avatar_url":"https://github.com/ibnz36.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s-http [![contributors](https://img.shields.io/github/contributors/Squioole/http)](https://github.com/Squioole/http/graphs/contributors)\n\nA (very) simple library for parsing http requests and generating responses.\n\n## Usage\n\nAdd this to your `Cargo.toml` dependencies:\n\n```\nhttp = { git = \"https://github.com/Brian3647/http\" }\n```\n\nExample code:\n\n```rs\nuse http::request::{HttpRequest, Method, Version, Resource};\nuse std::collections::HashMap;\n\nlet raw_request = String::from(\"GET /example HTTP/1.1\\r\\nHost: localhost:3000\\r\\nUser-Agent: rust\\r\\nAccept: */*\\r\\n\\r\\nhello world!\");\n\nlet req: HttpRequest = raw_request.into();\nlet mut headers_expected = HashMap::new();\nheaders_expected.insert(\"Host\".into(), \"localhost\".into());\nheaders_expected.insert(\"Accept\".into(), \"*/*\".into());\nheaders_expected.insert(\"User-Agent\".into(), \"rust\".into());\nassert_eq!(Method::Get, req.method);\nassert_eq!(Version::V1_1, req.version);\nassert_eq!(Resource::Path(\"/example\".to_string()), req.resource);\nassert_eq!(headers_expected, req.headers);\nassert_eq!(\"hello world!\", req.msg_body);\n```\n\n## Note\n\nThis code is a modified version from https://github.com/peshwar9/rust-servers-services-apps/tree/master/chapter2/scenario1/http. Almost everything is changed, but anyways thanks to @peshwar9 for the amazing rust book.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibnz36%2Fhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibnz36%2Fhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibnz36%2Fhttp/lists"}