main.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:iox-app-template 作者: CiscoDevNet 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号