v3.0.0-alpha.2
Pre-release
Pre-release
- Use an Arc instead of a Rc for
HandleError::Panic - Add
with_responsefunction on Context to overwrite the response. - Finish implementing Websockets. 🎉
- Add chat app example application.
- Rename
Server::starttoServer::runto emphasize that it blocks. - Pass
Argumentsto trace formatters instead of a String.
This can be more efficient if the formatter decides not to format the trace. - Attach a unique ID to each socket.
- Disallow forbidden headers as default headers.
- Rename
extensionmodule toextensions. - Added a RouteShorthand extension.
It allows you to useserver.get(...)instead ofserver.route(Method::GET, ...). - Added Redirect shorthand extension.
It allows you to usectx.redirect("...")instead ofctx.status(Status::Found).header(HeaderType::Location, "..."). - Rewrote the router to allow for more compacted routes.
Parameters and wildcards no longer have to be separated by a slash, they can be separated by any literal.
This was not implemented before because it it significantly more complicated to implement.
Here are some examples of what you can do now:/file/{name}.{ext}/hello*world
- Internal
url::decodewill not hard fail in the case of invalid url encoded strings. - Add
PathNormalizermiddleware that removes trailing and repeating slashes from paths. - Optimize router. Benchmarking is kinda hard but I think this new router is faster even though it is significantly more flexible.
- Rename HeaderType to HeaderName as that is the correct name.
- Accept
Into<Header>inContext::headerandResponse::header. - Create 'header structs' that can be converted into a
Headerand simplify working with headers in responses.
What's Changed
- afire 2.2.0 by @Basicprogrammer10 in #45
- Fix #46 by @Basicprogrammer10 in #47
Full Changelog: v2.1.0...v3.0.0-alpha.2