-
Notifications
You must be signed in to change notification settings - Fork 130
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
:known-content-types
key?
#261
Comments
|
This solution would also require parsing the json which I don't want to do before Also the doc says "parsed by the default implementation for :processable?". Following the main docs, I basically was hoping for something like this (defresource my-resource
:allowed-methods [:get :post]
:available-media-types ["application/json"]
:known-content-types ["application/json"]
... Instead of (defresource my-resource
:allowed-methods [:get :post]
:available-media-types ["application/json"]
:known-content-type? #(check-content-type % ["application/json"]) as suggested in the tutorial. In any case, it's a small point. Feel free to close if you think it's not worth the flame. |
I see, and I did not get your actual intention in the beginning. What you suggest is a good idea and independent of the entity parsing I suggested. I will happily apply a PR for |
As a new liberator user, I too found the tutorial surprisingly verbose and inefficient on this subject. Having a means of expressing the acceptability of request content types with data is a plus. |
I wonder if
:known-content-type?
check is standard enough such that a list of:known-content-types
would be warranted? This would parallel:available-media-types
and:media-type-available?
usage.The text was updated successfully, but these errors were encountered: