Big changes spanning several weeks’ work! Before I make a full release, I’d like comments on the changes as well as for people to try them out and give feedback.
I have published this PR as
0.5.0-alpha.1 to make it easier to try out.
The rendered documentation for this PR (including all optional features) is available here.
- Hyper’s new
- Iron (!!!), including a convenient middleware which saves all POST fields and files to a datastructure which is accessible via the request object (with sane limits on file sizes)
- Nickel, blocked on them upgrading to Hyper 0.7 so we don’t have to build two different versions
Changes to Client APIs
- New lazy-writing Multipart object which implements
Read(part of wrapping the
- Eager-writing Multipart object now returns errors immediately
chain_result!macro is exported with a syntax for binding the wrapped value in the previous result
Changes to Server APIs
- Removed the assumption in
HttpRequestthat the request object impls
Readfor the body
&mut hyper::server::Requestso that it doesn’t have to be consumed if the user doesn’t want it to be
tempdir, which is used for file saving by default, plus a bunch of new methods for controlling where and how files are saved
Mentored projects available here.
- A version of
multipart::client::lazy::Multipartwhich uses static chaining a la
std::io::Chain. I figured it wouldn’t be very useful as it cannot be constructed dynamically (each new field would change the type). I might change my tune if there’s a lot of want for statically dispatched requests with fixed fields.