Skip to content
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 header in REST API calls should not be mandatory for empty content #69

Closed
serefarikan opened this issue Aug 1, 2018 · 2 comments

Comments

@serefarikan
Copy link
Contributor

At various locations, the rest specification states that create calls with representation set to minimal should return only headers, and one of those headers is Content-Type.
this is a grey zone: the relevant RFC (https://tools.ietf.org/html/rfc7231#section-3.1.1.5) says that a sender that sends a payload body SHOULD set the content type but it does not say that in case of no content this header should be set
Moreover, the technology stack we're using is opinionated and does not let setting the content-type header when the content is empty.
Unless there is an argument against it, could we please consider not making content-type header mandatory when there is no content?
I realise the limitation of a tech stack is not grounds for requests for change, but in this case what the spec is asking is not making a lot of sense to me

So please consider that as the source of my request
here is an example: https://www.openehr.org/releases/ITS/latest/docs/ehr.html#composition-composition-post

@jakesmolka
Copy link
Member

In addition to what was changed in fd36cc3, removal of Content-Type header in 204 responses (e.g. https://specifications.openehr.org/releases/ITS-REST/Release-1.0.0/ehr.html#composition-composition-get) would make sense, too.

Should I create a new issue or can you reopen this one?

@sebastian-iancu
Copy link
Member

Ah, good catch, thanks! A new issue would be more appropriate.

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

No branches or pull requests

3 participants