From 5ec94ee6770fc3573765922d757daf77bb85a33e Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Tue, 7 Jul 2020 11:51:29 +0100 Subject: [PATCH] Added input content_type attribute --- src/labthings/view/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/labthings/view/__init__.py b/src/labthings/view/__init__.py index 96495b9a..2f9fefa3 100644 --- a/src/labthings/view/__init__.py +++ b/src/labthings/view/__init__.py @@ -44,8 +44,13 @@ class View(MethodView): _cls_tags = set() # Class tags that shouldn't be removed title: None + # Default input content_type + content_type = "application/json" + # Custom responses dictionary responses: dict = {} + # Methods for which to read arguments arg_methods = ("POST", "PUT", "PATCH") + # Methods for which to marshal responses marshal_methods = ("GET", "PUT", "POST", "PATCH") def __init__(self, *args, **kwargs):