How to POST html data to be handled by a route endpoint

=?UTF-8?B?zp3Or866zr/PgiDOks6tz4HOs Νίκος Βέργος
Fri Mar 6 05:33:46 EST 2020


First i must say i use Bottle, but the same may also be the case in Flask too. I ask here and not in sub Bottle because there are only a few people there and i receive no responses.

Actualy since i started here let me say what i have found.

Iam just trying to post html form data to the following endpoint.

@app.route( '/mailform', method=['POST'] )
IF i try to post the html form data using the the endpoint url way, i get "Method NOT Allowed" error:

<form method="POST" action="/mailform">


WHILE if i try the following way, i receive no error.

<form method="POST" action="%s"> ...html...  </form>''' % app.get_url(
'/mailform )

Can someone explain why?!


More information about the Python-list mailing list