You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently been working on servant-multipart, which provides form/multipart-data support to servant, mostly interesting for supporting file uploads.
While the server side of things required only a very minor change to Delayed to do things properly (#622), I got started thinking about client derivation. This should be possible in theory, given that http-client provides this module which does the hard work for us. However, adding multipart content to a request involves some IO: indeed, whenever you want to upload a local file, you have to go and read it to add its content to the request body.
As far as I can tell, this is not something we can do at the moment, and it would require us to "delay" the IO (a bit like we do in servant-server) until the point where the corresponding client function gets run. Or add a field that stores Parts in a list and simply fill that, instead of the request body field. This makes us have 2 fields for a single thing, that's not really satisfactory. That's why I'm opening this ticket -- I don't have any good idea to make this possible and reasonably nice. Does anyone? =)
Particularly interested in hearing @soenkehahn's thoughts.
The text was updated successfully, but these errors were encountered:
Hi folks,
I've recently been working on servant-multipart, which provides
form/multipart-data
support to servant, mostly interesting for supporting file uploads.While the server side of things required only a very minor change to Delayed to do things properly (#622), I got started thinking about client derivation. This should be possible in theory, given that
http-client
provides this module which does the hard work for us. However, adding multipart content to a request involves some IO: indeed, whenever you want to upload a local file, you have to go and read it to add its content to the request body.As far as I can tell, this is not something we can do at the moment, and it would require us to "delay" the IO (a bit like we do in servant-server) until the point where the corresponding client function gets run. Or add a field that stores
Part
s in a list and simply fill that, instead of the request body field. This makes us have 2 fields for a single thing, that's not really satisfactory. That's why I'm opening this ticket -- I don't have any good idea to make this possible and reasonably nice. Does anyone? =)Particularly interested in hearing @soenkehahn's thoughts.
The text was updated successfully, but these errors were encountered: