use request.setHeader
This commit is contained in:
parent
adf409cc4c
commit
13defd3cc3
1 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ class Server(Resource):
|
||||||
)
|
)
|
||||||
|
|
||||||
def render_json(self, request, response):
|
def render_json(self, request, response):
|
||||||
request.headers['Content-Type'] = 'application/json'
|
request.setHeader('Content-Type', 'application/json')
|
||||||
return json.dumps(response, indent=2)
|
return json.dumps(response, indent=2)
|
||||||
|
|
||||||
def getChild(self, name, request):
|
def getChild(self, name, request):
|
||||||
|
@ -177,7 +177,7 @@ class Server(Resource):
|
||||||
'queue': queued,
|
'queue': queued,
|
||||||
'offline': offline
|
'offline': offline
|
||||||
})
|
})
|
||||||
request.headers['Content-Type'] = 'text/html'
|
request.setHeader('Content-Type', 'text/html')
|
||||||
data = 'pandora_client distributed encoding server'
|
data = 'pandora_client distributed encoding server'
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue