mirror of
https://github.com/UofCBaja/BajaCloud.git
synced 2025-06-15 13:14:17 -06:00
feat(Packagers): testing out Django response options
This commit is contained in:
parent
0c60ffc5ed
commit
72fc3602d9
@ -4,8 +4,14 @@ from django.http import HttpResponse
|
|||||||
def index(request):
|
def index(request):
|
||||||
ymlschedule = {"message": False}
|
ymlschedule = {"message": False}
|
||||||
res = {
|
res = {
|
||||||
"statusCode": 200,
|
#"statusCode": 200, commented out because not needed django/wrapper will handle it
|
||||||
"isBase64ENcoded": "false",
|
"isBase64ENcoded": "false",
|
||||||
"body": json.dumps(ymlschedule)
|
"body": json.dumps(ymlschedule)
|
||||||
}
|
}
|
||||||
return HttpResponse(json.dumps(res))
|
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
|
||||||
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user