-
Notifications
You must be signed in to change notification settings - Fork 4
Description
For now it's not possible to use get request with query middleware. It's only working with post request, is it a intended ?
I think it can be useful in case we use only one query to allow get request like it's possible with CommandMiddleware. We just need to set \Prooph\HttpMiddleware\QueryMiddleware::NAME_ATTRIBUTE to the request attribute.
One more thing, with the post request we have "dependencies" with prooph component because client have to send the attribute prooph_query_name inside. If for any reason we need to change for an other command bus clients could not working or with a weird parameter that do not have any sense.
So I suggest to allow query middleware to handle get request with this purpose :
- if the request is post we do not change the behavior
- if the request is get we check request attribute like for
CommandMiddleware
I propose to use this lib to check request method : fig/http-message-util
Whate do you think ? @prolic @codeliner @basz