-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow IO when unrendering content types #343
Conversation
1e222bd
to
276dfd8
Compare
|
||
class AllCTUnrender (list :: [*]) a where | ||
handleCTypeH :: Proxy list | ||
-> ByteString -- Content-Type header | ||
-> ByteString -- Request body | ||
-> Maybe (Either String a) | ||
-> Maybe (ExceptT String IO a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the reason we're keeping the Maybe
that we want to be able to not do IO?
@fizruk: This PR is a bit old and stale. Should probably be rebased on current Also I'm not clear on the motivation. Was this to support file-uploads? |
Yes. I think this is still the right approach for that, especially since I think it's easier to do with recent changes. I'll take a look at this PR today, and try to rebase it. |
We no longer need to use unsafeInterleaveIO.
276dfd8
to
9d9091f
Compare
Done. Tests pass and we no longer need |
Taking a further look, it seems like it makes the most sense to keep the new Another point to note is that I don't immediately see a nice way of having configurable options - e.g. file size limits. If we make this not specific to For now I'm going to use the default configuration options. |
ping @fizruk, can this be closed? |
Closing this. |
This makes path to
multipart/form-data
content type, as mentioned in #133 (comment).