Skip to content

API Content-Type #130

Description

@fxedel

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).

Activity

  1. peternewman commented on Oct 15, 2017

    @peternewman
    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.

  2. peternewman commented on Oct 15, 2017

    @peternewman
    Member

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

  3. self-assigned this
    on Dec 27, 2017
  4. added a commit that references this issue on Apr 12, 2018
    020c4a4
  5. peternewman commented on Apr 14, 2018

    @peternewman
    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions