Skip to content

Commit 58a0275

Browse files
authored
Update app.py
1 parent cd76c95 commit 58a0275

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎app.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ def health():
1717
def failing():
1818
abort(404)
1919

20+
@app.route("/data")
21+
def get_data():
22+
body = jsonify({"error": "Too Many Requests", "retry_after": 2})
23+
return body, 429, {"Retry-After": "2"}
2024

2125
if __name__ == '__main__':
2226
port = os.environ.get('FLASK_PORT') or 8080

0 commit comments

Comments
 (0)