handy-httpd 7.7.1

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
  • 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

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();
}
Authors:
Dependencies:
slf4d, streams, httparsed
Versions:
8.7.0 2025-May-30
8.6.0 2025-May-14
8.5.0 2025-Jan-11
8.4.5 2025-Jan-06
8.4.4 2025-Jan-05
Show all 78 versions
Download Stats:
  • 21 downloads today

  • 55 downloads this week

  • 521 downloads this month

  • 20988 downloads total

Score:
4.5
Short URL:
handy-httpd.dub.pm