types.py 文件源码

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

项目:SuperOcto 作者: mcecchi 项目源码 文件源码
def on_api_get(self, request):
        """
        Called by OctoPrint upon a GET request to ``/api/plugin/<plugin identifier>``. ``request`` will contain the
        received `Flask request object <http://flask.pocoo.org/docs/0.9/api/#flask.Request>`_ which you may evaluate
        for additional arguments supplied with the request.

        If your plugin returns nothing here, OctoPrint will return an empty response with return code ``204 No content``
        for you. You may also return regular responses as you would return from any Flask view here though, e.g.
        ``return flask.jsonify(result="some json result")`` or ``return flask.make_response("Not found", 404)``.

        :param request: the Flask request object
        :return: ``None`` in which case OctoPrint will generate a ``204 No content`` response with empty body, or optionally
                 a proper Flask response.
        """
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号