{"action":"created","issue":{"url":"https://api.github.com/repos/rejectedsoftware/vibe.d/issues/1601","repository_url":"https://api.github.com/repos/rejectedsoftware/vibe.d","labels_url":"https://api.github.com/repos/rejectedsoftware/vibe.d/issues/1601/labels{/name}","comments_url":"https://api.github.com/repos/rejectedsoftware/vibe.d/issues/1601/comments","events_url":"https://api.github.com/repos/rejectedsoftware/vibe.d/issues/1601/events","html_url":"https://github.com/rejectedsoftware/vibe.d/issues/1601","id":185901981,"number":1601,"title":"Content Type for RestInterface","user":{"login":"SingingBush","id":870567,"avatar_url":"https://avatars.githubusercontent.com/u/870567?v=3","gravatar_id":"","url":"https://api.github.com/users/SingingBush","html_url":"https://github.com/SingingBush","followers_url":"https://api.github.com/users/SingingBush/followers","following_url":"https://api.github.com/users/SingingBush/following{/other_user}","gists_url":"https://api.github.com/users/SingingBush/gists{/gist_id}","starred_url":"https://api.github.com/users/SingingBush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SingingBush/subscriptions","organizations_url":"https://api.github.com/users/SingingBush/orgs","repos_url":"https://api.github.com/users/SingingBush/repos","events_url":"https://api.github.com/users/SingingBush/events{/privacy}","received_events_url":"https://api.github.com/users/SingingBush/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-28T11:37:33Z","updated_at":"2016-12-18T23:38:00Z","closed_at":null,"body":"My current project provides a REST API to be used by a front end written in [Ember](http://emberjs.com/). They favour making the backend conform to the [JSON API](http://jsonapi.org/) conventions. Part of which is to use the content type `application/vnd.api+json`.\n\nSo I've got the following where 'JsonApiImpl' is a class defining my endpoints:\n\n``` D\nauto router = new URLRouter;\nauto apiSettings = new RestInterfaceSettings;\napiSettings.baseURL = URL(\"/api\");\napiSettings.allowedOrigins = [\"*\"];\nrouter.registerRestInterface(new JsonApiImpl, apiSettings);\n```\n\nThe default seems to be to return the content type `application/json` but I can't seem to see a convenient way to set it to what I need.\n"},"comment":{"url":"https://api.github.com/repos/rejectedsoftware/vibe.d/issues/comments/267855745","html_url":"https://github.com/rejectedsoftware/vibe.d/issues/1601#issuecomment-267855745","issue_url":"https://api.github.com/repos/rejectedsoftware/vibe.d/issues/1601","id":267855745,"user":{"login":"s-ludwig","id":1645969,"avatar_url":"https://avatars.githubusercontent.com/u/1645969?v=3","gravatar_id":"","url":"https://api.github.com/users/s-ludwig","html_url":"https://github.com/s-ludwig","followers_url":"https://api.github.com/users/s-ludwig/followers","following_url":"https://api.github.com/users/s-ludwig/following{/other_user}","gists_url":"https://api.github.com/users/s-ludwig/gists{/gist_id}","starred_url":"https://api.github.com/users/s-ludwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-ludwig/subscriptions","organizations_url":"https://api.github.com/users/s-ludwig/orgs","repos_url":"https://api.github.com/users/s-ludwig/repos","events_url":"https://api.github.com/users/s-ludwig/events{/privacy}","received_events_url":"https://api.github.com/users/s-ludwig/received_events","type":"User","site_admin":false},"created_at":"2016-12-18T23:37:59Z","updated_at":"2016-12-18T23:37:59Z","body":"Okay, this has been implemented on master now."}}
{"actor":{"display_login":"s-ludwig"}}