-
Notifications
You must be signed in to change notification settings - Fork 149
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
content_type not handled properly if it is a function #343
Comments
I may be wrong, but I see nothing in the code base that would support providing content_type as a callable. That could be a relevant contribution IMO if you need it! |
Hm, to be honest, I didn't go trough the code base, but I thought that this part of documentation is saying it is possible. Or is it only a |
OH! You are right, the documentation explicitly says it should work! That's a bug then! (either in code or documentation) |
This should have worked, right. Have been there the other day (see #91) so will have a look if nobody is already into it. |
…dia type as scalar, improves and resolves Cornices#343
Hey there, i had a look and found the following things:
To improve the functionality:
[1] https://cornice.readthedocs.org/en/latest/validation.html#content-type-validation Maybe consider relabeling this from "bug" to "enhancement". |
…dia type as scalar, improves and resolves Cornices#343
Thanks for looking into this! I see you discussed it and changed the code base a bit, but just to check, does this mean that |
@bomb-on:
This should work now as we're using |
@amotl ah, I understand now... Ok, thank you one more time guys for all the effort and keep up with good work ;) |
thanks for the kind words :) |
…dia type as scalar, improves and resolves Cornices#343
I have defined
view
decorator in myresource
:and when I call it without
Content-Type
properly defined, I get a 415 error.However, if I want to call a function instead of defining a string for
content_type
and in some other file i have defined that function:
it won't produce error 415, but it will return a 200 response.
Why is this happening? For some reason I'm sure it was working few months ago when I defined it in this way...
The text was updated successfully, but these errors were encountered: