handy-httpd 7.10.4
Extremely lightweight HTTP server for D.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
handy-httpd
An extremely lightweight HTTP server for the D programming language.
Features
- HTTP/1.1
- Web Sockets
- Worker pool for request handling
- Simple configuration
- High performance
- Beginner friendly
- Extensible with custom handlers, exception handlers, and filters
- Well-documented
- Prioritises testability
- Ships with some handy pre-made request handlers:
- Serve static files with the FileResolvingHandler
- Apply filters before and after handling requests with the
FilteredHandler
- Handle complex URL paths, including path parameters and wildcards, with the PathDelegatingHandler
Important Links
Simple Example
import handy_httpd;
void main() {
new HttpServer((ref ctx) {
if (ctx.request.url == "/hello") {
ctx.response.writeBodyString("Hello world!");
} else {
ctx.response.setStatus(HttpStatus.NOT_FOUND);
}
}).start();
}
- Registered by Andrew Lalis
- 7.10.4 released 29 days ago
- andrewlalis/handy-httpd
- MIT
- Copyright © 2022, Andrew Lalis
- Authors:
- Dependencies:
- slf4d, streams, httparsed
- Versions:
-
7.10.4 2023-Aug-24 7.10.3 2023-Aug-23 7.10.2 2023-Aug-23 7.10.1 2023-Aug-23 7.10.0 2023-Aug-23 - Download Stats:
-
-
28 downloads today
-
147 downloads this week
-
920 downloads this month
-
16861 downloads total
-
- Score:
- 4.3
- Short URL:
- handy-httpd.dub.pm