quote.py 文件源码

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

项目:kapsel 作者: conda 项目源码 文件源码
def on_get(self, req, resp):
        """Handles GET requests"""
        resp.body = """
<html>
  <head>
    <title>Quote API Server</title>
  </head>
  <body>
    <p>This is a toy JSON API server example.</p>
    <p>Make a GET request to <a href="%s/quote">%s/quote</a></p>
  </body>
</html>
""" % (self.prefix, self.prefix)
        resp.content_type = "text/html"
        resp.status = falcon.HTTP_200


# A Falcon middleware to implement validation of the Host header in requests
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号