mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 14:50:17 +00:00
Allow all methods on /anything
This commit is contained in:
+3
-3
@@ -164,12 +164,12 @@ def view_get():
|
||||
return jsonify(get_dict('url', 'args', 'headers', 'origin'))
|
||||
|
||||
|
||||
@app.route('/anything')
|
||||
@app.route('/anything/<path:anything>')
|
||||
@app.route('/anything', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'TRACE'])
|
||||
@app.route('/anything/<path:anything>', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'TRACE'])
|
||||
def view_anything(anything=None):
|
||||
"""Returns request data."""
|
||||
|
||||
return jsonify(get_dict('url', 'args', 'headers', 'origin', 'method'))
|
||||
return jsonify(get_dict('url', 'args', 'headers', 'origin', 'method', 'form', 'data', 'files', 'json'))
|
||||
|
||||
|
||||
@app.route('/post', methods=('POST',))
|
||||
|
||||
Reference in New Issue
Block a user