David Pedersen
David Pedersen
Could also consider doing ```rust app.at("/foo").get(handler).post(handler); ``` It is perhaps more symmetric 🤷 I haven't thought much about this and have to play around with it. Note this is exactly...
Hm yeah that could work if `MethodRouter` doesn't implement `Service`. I didn't consider that. I was a little worried that rust wouldn't be able to infer the state type if...
I think sharing state across all/most handlers is a very common use case. It's not specific to cookies and haven't thought about migrating that. But I still think it makes...
I actually think requiring the state used with private and signed cookies to implement `From for cookie::Key {}` is kinda nice. That also avoids runtime errors because you cannot forget...
Yep that is annoying for sure. I did actually have a previous version where the state would be lazily applied so you didn't have to pass it around. But it...
Alright this is basically done but I'll leave it as a draft until https://github.com/tokio-rs/axum/pull/1086 and https://github.com/tokio-rs/axum/pull/1121 has been merged. I would like to only fix the merge conflicts once.
Alright this is ready for review now. I apologies for the large diff. This required touching pretty much all the files. The good news is that most changes are mechanical....
Also note the "known limitations" and "follow-ups" I posted in the top comment. I'll make issues for the follow-ups once this is merged.
> You wrote above that you want to merge #1121 first, has that plan changed? Oh I had forgotten about that. I thought this PR was more thoroughly baked so...
I went ahead and ported the cookie extractors in https://github.com/tokio-rs/axum/pull/1250. Works pretty well I think.