# POST request form

**URL:** <https://discourse.mitmproxy.org/t/post-request-form/1072>\
**Category:** help\
**Created:** [May 25, 2018, 8:27pm UTC](https://discourse.mitmproxy.org/t/post-request-form/1072 "2018-05-25T20:27:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![habeeb](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@habeeb](https://discourse.mitmproxy.org/u/habeeb)\
**Post date:** [May 25, 2018, 8:27pm UTC](https://discourse.mitmproxy.org/t/post-request-form/1072/1 "2018-05-25T20:27:17Z")

</div>

This old code does not work with version 3.  
if “[login.xyz.com](http://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?
