Set content-type to routes that had none set
Resolves openbmc/openbmc#1927.
Change-Id: I05f0a1e37d8ebc83ebe1ff1d9aecba72ebc3aa39
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py
index f4ae606..3f98904 100644
--- a/module/obmc/wsgi/apps/rest_dbus.py
+++ b/module/obmc/wsgi/apps/rest_dbus.py
@@ -443,10 +443,11 @@
class SchemaHandler(RouteHandler):
verbs = ['GET']
rules = '<path:path>/schema'
+ content_type = 'application/json'
def __init__(self, app, bus):
super(SchemaHandler, self).__init__(
- app, bus, self.verbs, self.rules)
+ app, bus, self.verbs, self.rules, self.content_type)
def find(self, path):
return self.try_mapper_call(
@@ -473,11 +474,12 @@
class InstanceHandler(RouteHandler):
verbs = ['GET', 'PUT', 'DELETE']
rules = '<path:path>'
+ content_type = 'application/json'
request_type = dict
def __init__(self, app, bus):
super(InstanceHandler, self).__init__(
- app, bus, self.verbs, self.rules)
+ app, bus, self.verbs, self.rules, self.content_type)
def find(self, path, callback=None):
return {path: self.try_mapper_call(