KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This will work: @RequestMapping(value = "/test", method = RequestMethod.POST, headers = {"content-type=application/json"}) { ....... } If I add another value to it like the following, then it will fail and tell me this: The specified HTTP method is not allowed for the requested resource (Request method 'POST' not supported) @RequestMapping(value = "/test", method = RequestMethod.POST, headers = {"content-type=application/json","content-type=application/xml"}) { ....... } I guess this is because Spring thinks the two content type values have "AND" relationship but instead I want them to be "OR". Any suggestions? Thanks!
Tags (comma-separated)
Save Edits
Cancel