# Forward an http request with uploaded multipart/form-data directly to another server

**URL:** <https://forum.golangbridge.org/t/forward-an-http-request-with-uploaded-multipart-form-data-directly-to-another-server/2995>\
**Category:** Getting Help\
**Created:** [July 14, 2016, 6:05pm UTC](https://forum.golangbridge.org/t/forward-an-http-request-with-uploaded-multipart-form-data-directly-to-another-server/2995 "2016-07-14T18:05:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![radovskyb](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/radovskyb/32/2423_2.png) [@radovskyb](https://forum.golangbridge.org/u/radovskyb)\
**Post date:** [July 14, 2016, 6:05pm UTC](https://forum.golangbridge.org/t/forward-an-http-request-with-uploaded-multipart-form-data-directly-to-another-server/2995/1 "2016-07-14T18:05:37Z")

</div>

Hey guys,

Just wondering if anybody has any ideas as to how it would be possible from within an http handler to send along the current request containing multipart/form-data uploaded from an upload form, directly to another server.

Just for the record. I’ve already written one solution which is to create a new multipart writer, iterate through all of the multipart file headers from the current request, open each file, writing them all to the multipart writer, which I then send off in a new http post request.

I just wonder if there’s an easier way…

Any ideas would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![radovskyb](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/radovskyb/32/2423_2.png) [@radovskyb](https://forum.golangbridge.org/u/radovskyb)\
**Post date:** [August 2, 2016, 3:42am UTC](https://forum.golangbridge.org/t/forward-an-http-request-with-uploaded-multipart-form-data-directly-to-another-server/2995/3 "2016-08-02T03:42:26Z")

</div>

All that was needed in the end was a [simple reverse proxy](https://play.golang.org/p/YqeE7vzPDo).

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [October 31, 2016, 3:42am UTC](https://forum.golangbridge.org/t/forward-an-http-request-with-uploaded-multipart-form-data-directly-to-another-server/2995/4 "2016-10-31T03:42:32Z")

</div>

Closed on October 31, 2016, 3:42am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
