Remove int constraint on delay

This allows the delay endpoint to accept floats as delay values.
This commit is contained in:
Kevin Lu
2015-11-20 21:54:13 +00:00
committed by Ian Cordasco
parent 762079cbd3
commit eef6c0f665
+2 -1
View File
@@ -438,7 +438,7 @@ def digest_auth(qop=None, user='user', passwd='passwd'):
return jsonify(authenticated=True, user=user)
@app.route('/delay/<int:delay>')
@app.route('/delay/<delay>')
def delay_response(delay):
"""Returns a delayed response"""
delay = min(delay, 10)
@@ -448,6 +448,7 @@ def delay_response(delay):
return jsonify(get_dict(
'url', 'args', 'form', 'data', 'origin', 'headers', 'files'))
@app.route('/drip')
def drip():
"""Drips data over a duration after an optional initial delay."""