Returning multiple values in a FLASK response Returning multiple values in a FLASK response flask flask

Returning multiple values in a FLASK response


Those flask interfaces are a bit too overloaded, which can be confusing. In the face of ambiguity, unfortunately, flask does not refuse the temptation to guess. If you dig into the relevant section of the docs you will find this part for calling make_response with a tuple:

Either (body, status, headers), (body, status), or (body, headers)

The second element of the tuple was not being interpreted as part of the response body.

Consider returning something like this instead:

flask.jsonify(vioAllDiv=vioAllDiv, vioAllScript=vioAllScript)