BUGFIX - Fix for #17 application/json

pull/22/head
Swissky 2019-12-19 20:48:02 +01:00
parent 8ffaa5c899
commit b7b0f76afe
1 changed files with 2 additions and 2 deletions

View File

@ -52,11 +52,11 @@ class Requester(object):
if self.method == "POST":
# Handle JSON data
if self.headers['Content-Type'] and self.headers['Content-Type'] == "application/json":
if self.headers['Content-Type'] and "application/json" in self.headers['Content-Type']:
self.data = json.loads(data)
# Handle XML data
elif self.headers['Content-Type'] and self.headers['Content-Type'] == "application/xml":
elif self.headers['Content-Type'] and "application/xml" in self.headers['Content-Type']:
self.data['__xml__'] = data
# Handle FORM data