v3.0.0-alpha.2
Pre-release
Pre-release
- Use an Arc instead of a Rc for
HandleError::Panic
- Add
with_response
function on Context to overwrite the response. - Finish implementing Websockets. 🎉
- Add chat app example application.
- Rename
Server::start
toServer::run
to emphasize that it blocks. - Pass
Arguments
to 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
extension
module 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::decode
will not hard fail in the case of invalid url encoded strings. - Add
PathNormalizer
middleware 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::header
andResponse::header
. - Create 'header structs' that can be converted into a
Header
and 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