diff --git a/httpbin/core.py b/httpbin/core.py index 3232627..49837dd 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -291,6 +291,13 @@ def view_cookies(hide_env=True): return jsonify(cookies=cookies) +@app.route('/forms/post') +def view_forms_post(): + """Simple HTML form.""" + + return render_template('forms-post.html') + + @app.route('/cookies/set//') def set_cookie(name, value): """Sets a cookie and redirects to cookie list.""" diff --git a/httpbin/templates/forms-post.html b/httpbin/templates/forms-post.html new file mode 100755 index 0000000..e79dffd --- /dev/null +++ b/httpbin/templates/forms-post.html @@ -0,0 +1,29 @@ + + + + + + +
+

+

+

+
+ Pizza Size +

+

+

+
+
+ Pizza Toppings +

+

+

+

+
+

+

+

+
+ + diff --git a/httpbin/templates/httpbin.1.html b/httpbin/templates/httpbin.1.html index ff21912..005a3d3 100644 --- a/httpbin/templates/httpbin.1.html +++ b/httpbin/templates/httpbin.1.html @@ -36,6 +36,7 @@
  • /robots.txt Returns some robots.txt rules.
  • /deny Denied by robots.txt file.
  • /cache 200 unless If-Modified-Since was sent, then 304.
  • +
  • /forms/post HTML form that submits to /post.