def do_GET(self):
if self.path == '/':
# Create the response
response = {
'billing_id': config_custom.billing_id,
'customer_id' : config_custom.customer_id,
'location_id' : config_custom.location_id,
}
# Optionally include other information
if config_custom.is_note_displayed:
response['note_text'] = config_custom.note_text
# Write the response
self.protocol_version = 'HTTP/1.1'
self.send_response(200, 'OK')
self.send_header('Content-type', 'application/json')
self.end_headers()
self.wfile.write(bytes(json.dumps(response)))
# self.path = '/'
return
# return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
评论列表
文章目录