microasynchttpserver

A thin asynchronous HTTP server library, API compatible with Nim's built-in asynchttpserver.


Keywords
web, http, async, server
License
MIT
Install
nimble install microasynchttpserver

Documentation

microasynchttpserver

microasynchttpserver is a thin asynchronous HTTP server library for Nim. It is API compatible with Nim's built-in asynchttpserver, and allows programs greater control over the HTTP connection than asynchttpserver does.

Features

  • Production-ready
  • Uses nim-picohttpparser for HTTP header parsing
  • Acts as a thin HTTP server library
    • Only parses HTTP method, protocol version, URL, and headers
    • Everything else is up to the application

Usage

microasynchttpserver is mostly API compatible with asynchttpserver. Use the newMicroAsyncHttpServer proc to instantiate a MicroAsyncHttpServer, and use it just like an AsyncHttpServer.

MicroAsyncHttpServer will only fill in the client, reqMethod, headers, protocol, url, and hostname fields of Request objects. HTTP request bodies/data must be handled by your application, and read directly from the client socket.

License

This project is licensed under the MIT License. For full license text, see LICENSE.