You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if it might make sense to just make todict a built-in middleware, and if necessary just make the original Requst object a field in the resulting dictionary. @christopher-dG do you have a use-case that requires using the HTTP Request object directly?
I was looking for the simplest path from an HTTP app to a Mux one, so I didn't want to change my handlers. I like working with structs over dicts, it's just preference really.
Given that pretty much all the provided middleware uses the assumed dictionary, it might be a decent chunk of work to add methods for using the Request object directly. There's also the question of, what do you use to pass state around between middleware. Any ideas?
https://github.com/JuliaWeb/Mux.jl/blob/master/src/routing.jl#L42
req[:app]
makes the assumption that the request is a Dict with that key, which is only the case whentodict
has been used.The text was updated successfully, but these errors were encountered: