This repository has been archived by the owner on Nov 13, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provide guideline for content negotiation #135
base: master
Are you sure you want to change the base?
Provide guideline for content negotiation #135
Changes from all commits
9514baa
7ce78c7
927802c
6814c3c
bbaa4ed
68b3900
9c3c5c8
5682ea1
8b7c9b2
5960ab1
2b4433a
3b499e7
15fb8de
7e2b4a9
b7d8526
969eb21
cb0fcee
c31adb6
9bdd199
8dca836
23528ce
4abfa89
2df1802
fb67085
04afee2
3cb9690
d2af233
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question : just imagine that i want to return XML for only a single operation. What should i do?
A better scenario is : I have an API with multiple operations, one of those is a GET that returns a list of items.
I want to be able to get the list of items in "text/csv" what should be the approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can uses the [Produces("text/csv") but this will not allow the "text/csv" as an acceptable "accept' header..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that was a mistake, you just shouldn't return an ok(...) and then you can work with the [Produces]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now added some information about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why "codes"? It's more error response format