POST request form


#1

This old code does not work with version 3.
if “login.xyz.com” in flow.request.headers[“host”] :
form = flow.request.get_form_urlencoded()
form[“username”] = [“user1”]
form[“password”] = [“pwd1”]
flow.request.set_form_urlencoded(form)

Any help?