# Are there any script examples for creating a GET/POST/PUT?

**URL:** <https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134>\
**Category:** help\
**Created:** [August 7, 2016, 2:00am UTC](https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134 "2016-08-07T02:00:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mk1Escort](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mk1Escort](https://discourse.mitmproxy.org/u/Mk1Escort)\
**Post date:** [August 7, 2016, 2:00am UTC](https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134/1 "2016-08-07T02:00:15Z")

</div>

I know you can manually create a GET/POST/PUT from the ui, but I was wondering if it’s possible via script. I’d like to take information from a previous GET response and use it to create a POST from scratch.

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [August 9, 2016, 1:32am UTC](https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134/2 "2016-08-09T01:32:53Z")

</div>

The API for this is terrible at the moment, but you can use the FlowMaster’s `create_request` and `replay_request` functions to do just that (documentation is the source, sorry - make sure to select the right version when reading through it).

I opened an issue foor this: [https://github.com/mitmproxy/mitmproxy/issues/1473](https://github.com/mitmproxy/mitmproxy/issues/1473)

---

<div class="post-metadata">

**Author:** ![Mk1Escort](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mk1Escort](https://discourse.mitmproxy.org/u/Mk1Escort)\
**Post date:** [December 9, 2016, 4:00pm UTC](https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134/3 "2016-12-09T16:00:55Z")

</div>

Has there been any progress with this? As it stands right now, I can’t even get the example dup\_and\_replay script to work in 0.18.2.
