From 4104704a87b97daa96985c1c48c3f6d6f29131c9 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 28 Jul 2023 17:17:51 +0200 Subject: [PATCH] allow json requests --- moulinette/interfaces/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moulinette/interfaces/api.py b/moulinette/interfaces/api.py index bf3b0c7f..c0e18be8 100644 --- a/moulinette/interfaces/api.py +++ b/moulinette/interfaces/api.py @@ -312,6 +312,9 @@ class _ActionsMapPlugin: return value def wrapper(*args, **kwargs): + if request.get_header("Content-Type") == "application/json": + return callback((request.method, context.rule), request.json) + params = kwargs # Format boolean params for a in args: