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
评论列表
文章目录