-
Notifications
You must be signed in to change notification settings - Fork 45
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
Doing a request without accept header causes an exception #88
Comments
Basically, we have the ability to set Accept criteria via the "accept_criteria" configuration key of each controller. However, this always defaults to the default ViewModel implementation -- which means the default renderer implementation, the PhpRenderer, will be selected. So, you have a couple of options currently:
The question I have is: should this be a feature of the module? In other words should I have a listener by default, and allow opting-in to it by selected resource controller? |
@macnibblet Any comments on the above? |
I like the second idea of using a listener and short circuiting with an ApiProblem with appropriate information and a http status code of 406. Is there any good use case for using a post-check ? |
Another interesting issue i found is that angularjs default |
I had this strange error with my application just now until i figured out that i was not setting the Accept header.
Exposed message was
Zend\View\Renderer\PhpRenderer::render: Unable to render template "phly-restfully/resource/get"; resolver could not resolve to a file
The text was updated successfully, but these errors were encountered: