I'm writing a server and I need to forward along a certain Request message. This message is basically either a POST (or GET) message, possibly containing a file of a few megabytes. This message is forwarded to another server that actually stores (or retrieves) the file.
I'm using the Yesod framework. So, using getWaiRequest
, I can get a WAI Request. But to initiate a new message to pass along, I need to use the Network.HTTP.Conduit for its laziness. So I need to make a Request m
in that module. But I have no clue how to do this conversion. WAI's Request
is simply a data type, but Conduit's is a Request m
type, so I kept getting error messages trying to copy stuff over.
Can somebody tell me how I do this? If not, how I can just pass along the WAI Request to another server without using HTTP Conduit would be just as good.
Thanks!