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

API Content-Type #130

Open
fxedel opened this issue Oct 15, 2017 · 3 comments
Open

API Content-Type #130

fxedel opened this issue Oct 15, 2017 · 3 comments
Assignees
Labels

Comments

@fxedel
Copy link
Member

fxedel commented Oct 15, 2017

The JSON and Proto API (e.g. http://rdm.openlighting.org/api/json/1/manufacturers) both return Content-Type: text/plain in their headers. However, common REST APIs (like this) use Content-Type: application/json.

A nice advantage in Firefox is that Content-Type: application/json urls are automatically JSON parsed and prettyprinted (with foldable arrays/objects).

@peternewman
Copy link
Member

https://github.com/OpenLightingProject/rdm-app/blob/master/api/json_v1.py#L35

Need to check with rdmprotocol.org that this doesn't affect them when we do it.

"text/json" would be closer to what we already do elsewhere though.

@peternewman
Copy link
Member

Actually, it looks like what we do already is wrong and it should be application/json throughout...

@peternewman peternewman self-assigned this Dec 27, 2017
fxedel added a commit to fxedel/rdm-app that referenced this issue Apr 12, 2018
@peternewman
Copy link
Member

I've finally pushed and opened my PR #186

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

No branches or pull requests

2 participants