Ogeon / rustful

[OUTDATED] A light HTTP framework for Rust
https://docs.rs/rustful
Apache License 2.0
862 stars 52 forks source link

Move hypermedia responsibility from router to handlers #78

Closed Ogeon closed 8 years ago

Ogeon commented 8 years ago

This changes some of how hypermedia is delivered to the handlers. It's possible to access the handlers that hyperlinks points at and get a description string from them. Routers are no longer responsible for delivering any other kind of hypermedia, so the Hypermedia type has been removed and only hyperlinks are delivered through the Endpoint.

This is a breaking change for anything that uses the hyperlinks or the Hypermedia structure in any way, including custom routers.

Ogeon commented 8 years ago

I'm considering removing the Hypermedia struct for now, since the Handler trait can take care of that, and just have the hyperlinks in the Context. I can't think of anything else that can only come from the router...

Ogeon commented 8 years ago

@homu r+

homu commented 8 years ago

:pushpin: Commit 8e101c2 has been approved by Ogeon

homu commented 8 years ago

:hourglass: Testing commit 8e101c2 with merge cf9f274...

homu commented 8 years ago

:sunny: Test successful - status