{"action":"opened","issue":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/920","labels_url":"https://api.github.com/repos/WP-API/WP-API/issues/920/labels{/name}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/920/comments","events_url":"https://api.github.com/repos/WP-API/WP-API/issues/920/events","html_url":"https://github.com/WP-API/WP-API/issues/920","id":58630078,"number":920,"title":"Filters to allow control over transport","user":{"login":"timothy-h","id":5342087,"avatar_url":"https://avatars.githubusercontent.com/u/5342087?v=3","gravatar_id":"","url":"https://api.github.com/users/timothy-h","html_url":"https://github.com/timothy-h","followers_url":"https://api.github.com/users/timothy-h/followers","following_url":"https://api.github.com/users/timothy-h/following{/other_user}","gists_url":"https://api.github.com/users/timothy-h/gists{/gist_id}","starred_url":"https://api.github.com/users/timothy-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothy-h/subscriptions","organizations_url":"https://api.github.com/users/timothy-h/orgs","repos_url":"https://api.github.com/users/timothy-h/repos","events_url":"https://api.github.com/users/timothy-h/events{/privacy}","received_events_url":"https://api.github.com/users/timothy-h/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-23T18:49:27Z","updated_at":"2015-02-23T18:49:27Z","closed_at":null,"body":"Would it be possible to add filters to lib/infrastructure/class-wp-json-server.php to allow the manual definition of the content type, as well as to format the data that is being returned by an endpoint? In a project I'm working on, I'm trying to generate csv files on the fly based on parameters passed along a WP API endpoint. The current api forces either application/javascript or application/json, and automatically encodes the return data as json. It would be great if I could define the content type and serialization format either in the rule declaration itself or via a filter."}}