commented code removed, removed http status and content-type from return
authorSebastian Steiner <e1029038@student.tuwien.ac.at>
Tue, 11 Dec 2018 13:20:18 +0000 (14:20 +0100)
committerSebastian Steiner <e1029038@student.tuwien.ac.at>
Tue, 11 Dec 2018 13:20:18 +0000 (14:20 +0100)
service-analysis/sentiment_analysis.py

index 7b449d2082d16f0b9cb5eb26a44756780e9a3530..2a013e943a63174c62de7ddde25b3da8177478ee 100644 (file)
@@ -34,11 +34,7 @@ class Sentiment_Analysis(Resource):
                        return make_error(503, message=service_error_503)
                sentiment = value/len(text_array)
                data = {'sentiment': sentiment}
-               return data, 200, {'Content-Type': 'application/json'}
-               #r = Response(response=json.dumps(data), status=200, mimetype="application/json")
-               #r.headers["Content-Type"] = "application/json"
-               #return r
-               #return output_json(json.dumps(data), 200, headers={'Content-Type': "application/json"})
+               return data
                                
 api.add_resource(Sentiment_Analysis, '/')