The get parameter in flask cannot be used in psot?

:

<a href="{{ url_for("main.editrole",edit_id = roles.id )}}"></a>
:

def editrole():
    roleid = request.args.get("edit_id")
    if request.method == "POST":
        print roleid         //postroleid None
    return render_template("editrole.html")    

editrole.html page, POST is the data submitted using ajax, and roleid is None when saving the data.

how can I get the value of roleid in post?

Feb.06,2022

try request.vaules.get ('edit_id')

Menu