diff --git a/djangotutorial/mysite/newtest.py b/djangotutorial/mysite/newtest.py index 36ff0f5..210ee0e 100644 --- a/djangotutorial/mysite/newtest.py +++ b/djangotutorial/mysite/newtest.py @@ -4,8 +4,14 @@ from django.http import HttpResponse def index(request): ymlschedule = {"message": False} res = { - "statusCode": 200, + #"statusCode": 200, commented out because not needed django/wrapper will handle it "isBase64ENcoded": "false", "body": json.dumps(ymlschedule) } - return HttpResponse(json.dumps(res)) \ No newline at end of file + return HttpResponse(json.dumps(res), content_type='application/json') + ''' + response = HttpResponse(json.dumps(res), content_type='application/json') + response['X-IsBase64Encoded'] = 'false' # Custom header to indicate base64 encoding + response.status_code = 200 + return response + '''