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
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
@Orkin don't worry for dependency on prooph/service-bus. This middleware is intended to bridge prooph's service bus and a support for any other bus component will never happen within this project. If someone is planning to do the same for SimpleBus, they have to create their own middlewares for it.
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 :
CommandMiddleware
I propose to use this lib to check request method :
fig/http-message-util
Whate do you think ? @prolic @codeliner @basz
The text was updated successfully, but these errors were encountered: