Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Session Ended Request - Allow null as a return value in AbstractRequestHandler::handleRequest? #11

Closed
fabeat opened this issue Dec 4, 2017 · 1 comment
Assignees

Comments

@fabeat
Copy link
Contributor

fabeat commented Dec 4, 2017

According to the Amazon documentation, a SessionEndedRequest may not get a response.

In this library however, a RequestHandler must return a Response Object (see AbstractRequestHandler::handleRequest).

Should we allow AbstractRequestHandler::handleRequest to return null or create an EmptyResponse class that returns NULL when it is serialized to JSON?

Or do you have another idea?

@maxbeckers
Copy link
Owner

I think it's better to allow AbstractRequestHandler::handleRequest to return null. Then you don't have an EmptyResponse Object, without any usage. When we don't need a Response in this case, then we should return a null response. And I think we shoud describe in phpdoc in which case the response makes sence to be null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants