From 12176ed0edb34592d5e35efc2a9bbba2a0badaa9 Mon Sep 17 00:00:00 2001 From: k Date: Fri, 29 Dec 2017 15:19:27 +0100 Subject: [PATCH] Added Express.json() for express 4.16.0+ --- src/express/Express.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/express/Express.hx b/src/express/Express.hx index 8927dc3..2512cc5 100644 --- a/src/express/Express.hx +++ b/src/express/Express.hx @@ -2,6 +2,7 @@ package express; import express.Middleware; import haxe.extern.Rest; +import mw.bodyparser.JsonOptions; @:jsRequire("express") extern class Express extends Route { @@ -34,6 +35,7 @@ extern class Express extends Route { @:overload(function(path : String, router : Router) : Express {}) function use(path : String, callback : EitherMiddleware, callbacks : Rest) : Express; + static function json(?options : JsonOptions) : Middleware; inline static function serveStatic(root : String, ?options : StaticOptions) : Middleware return untyped Express["static"](root, options); }