Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Add support for specifying content-type for [Body] parameters #800

Closed
pranavkm opened this issue Jul 15, 2014 · 1 comment
Closed

Add support for specifying content-type for [Body] parameters #800

pranavkm opened this issue Jul 15, 2014 · 1 comment
Labels

Comments

@pranavkm
Copy link
Contributor

The intent is to only bind the value if the content-type of the request matches:

public IActionResult Foo([Body("application/json")] MyModel model)
@danroth27
Copy link
Member

ConsumesAttribute handles this.

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

No branches or pull requests

2 participants