Skip to content
Discussion options

You must be logged in to vote

Yes, did that.

How does [Produces] interact with output formatters? Does it mean you're specified in producer should be the one supported by the formatter? Unless action method directly writes to the response)?

[Produces] limits the set of content types an action can return. The output formatter must support at least one of these types, otherwise you’ll get a 406. It doesn’t add new formatters but just constrains negotiation. If the action writes directly to the response, [Produces] has no effect.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@voroninp
Comment options

@engineering87
Comment options

Answer selected by voroninp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants