{"id":13804207,"url":"https://github.com/huntlabs/hunt-http","last_synced_at":"2025-10-26T21:34:46.523Z","repository":{"id":96141872,"uuid":"141401513","full_name":"huntlabs/hunt-http","owner":"huntlabs","description":"http library for D, support http 1.1 / http 2.0 (http2) / websocket server and client.","archived":false,"fork":false,"pushed_at":"2022-05-17T13:49:58.000Z","size":1939,"stargazers_count":31,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-06T19:55:08.240Z","etag":null,"topics":["http-client","http-protocol","http-server","http2","hunt","websocket"],"latest_commit_sha":null,"homepage":"","language":"D","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/huntlabs.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}},"created_at":"2018-07-18T07:59:25.000Z","updated_at":"2024-10-04T05:13:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"70103ead-4ce6-413f-b1a0-8ee6721219ce","html_url":"https://github.com/huntlabs/hunt-http","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/huntlabs/hunt-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huntlabs","download_url":"https://codeload.github.com/huntlabs/hunt-http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001277,"owners_count":26083040,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["http-client","http-protocol","http-server","http2","hunt","websocket"],"created_at":"2024-08-04T01:00:43.737Z","updated_at":"2025-10-09T10:39:42.687Z","avatar_url":"https://github.com/huntlabs.png","language":"D","funding_links":[],"categories":["Web Frameworks"],"sub_categories":["Bare metal / kernel development"],"readme":"[![Build Status](https://travis-ci.org/huntlabs/hunt-http.svg?branch=master)](https://travis-ci.org/huntlabs/hunt-http)\n\n# hunt-http\nHunt-Http is a flexible performant http server and client written in D Programming Language.\n\n## Features\n| Feature | Server | Client |\n|--------|--------|--------|\n| HTTP 1.x | tested | tested |\n| HTTP/2 | tested | tested |\n| TLS 1.2 | tested | tested[1] |\n| WebSocket[2] | tested | tested |\n| Routing | tested | none |\n| Cookie | tested | tested[3] |\n| Session | tested[4] | tested |\n| Form-Data[5] | tested | tested |\n| X-WWW-Form | tested | tested |\n\n**Note:**\n\n[1] Mutual TLS supported \u003cbr\u003e\n[2] WSS untested\u003cbr\u003e\n[3] In-memory only\u003cbr\u003e\n[4] In-memory only\u003cbr\u003e\n[5] File upload and download\u003cbr\u003e\n\n## Simple codes\n\n### Using hunt-http build a web server\n```D\nimport hunt.http;\n\nvoid main()\n{\n    auto server = HttpServer.builder()\n        .setListener(8080, \"0.0.0.0\")\n        .setHandler((RoutingContext context) {\n            context.write(\"Hello World!\");\n            context.end();\n        }).build();\n\n    server.start();\n}\n```\n\n### Using hunt-http build a http client\n```D\nimport hunt.http;\n\nimport std.stdio;\n\nvoid main()\n{\n    auto client = new HttpClient();\n\n    auto request = new RequestBuilder().url(\"http://www.huntlabs.net\").build();\n\n    auto response = client.newCall(request).execute();\n\n    if (response !is null)\n    {\n        writeln(response.getBody().asString());\n    }\n}\n```\n\n### Using hunt-http build a websocket server\n```D\nimport hunt.http;\n\nvoid main()\n{\n    auto server = HttpServer.builder()\n        .setListener(8080, \"0.0.0.0\")\n        .websocket(\"/ws\", new class AbstractWebSocketMessageHandler {\n            override void onText(WebSocketConnection connection, string text)\n            {\n                connection.sendText(\"Hello \" ~ text);\n            }\n        }).build()\n\n    server.start();\n}\n```\n\n\n## Avaliable versions\n| Name | Description | \n|--------|--------|\n| HUNT_HTTP_DEBUG |  Used to log debug messages about Hunt-HTTP |\n| HUNT_METRIC |  Used to enable some operations and APIs about metric |\n\n## TODO\n- [ ] Reorganizing modules\n- [ ] PersistentCookieStore for HttpClient\n- [ ] Benchmark\n\n## References\n- Eclipse Jetty 9.4.x, [https://github.com/eclipse/jetty.project](https://github.com/eclipse/jetty.project)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuntlabs%2Fhunt-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuntlabs%2Fhunt-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuntlabs%2Fhunt-http/lists"}