{"action":"opened","issue":{"url":"https://api.github.com/repos/jshttp/negotiator/issues/52","repository_url":"https://api.github.com/repos/jshttp/negotiator","labels_url":"https://api.github.com/repos/jshttp/negotiator/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/jshttp/negotiator/issues/52/comments","events_url":"https://api.github.com/repos/jshttp/negotiator/issues/52/events","html_url":"https://github.com/jshttp/negotiator/issues/52","id":185914771,"number":52,"title":"Caching the availableMediaTypes","user":{"login":"s-ko-mo","id":15816606,"avatar_url":"https://avatars.githubusercontent.com/u/15816606?v=3","gravatar_id":"","url":"https://api.github.com/users/s-ko-mo","html_url":"https://github.com/s-ko-mo","followers_url":"https://api.github.com/users/s-ko-mo/followers","following_url":"https://api.github.com/users/s-ko-mo/following{/other_user}","gists_url":"https://api.github.com/users/s-ko-mo/gists{/gist_id}","starred_url":"https://api.github.com/users/s-ko-mo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-ko-mo/subscriptions","organizations_url":"https://api.github.com/users/s-ko-mo/orgs","repos_url":"https://api.github.com/users/s-ko-mo/repos","events_url":"https://api.github.com/users/s-ko-mo/events{/privacy}","received_events_url":"https://api.github.com/users/s-ko-mo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-28T12:47:27Z","updated_at":"2016-10-28T12:47:27Z","closed_at":null,"body":"Hello,\r\n\r\ncurrently the incomming request is given to the constructur of 'Negotiator' and the 'availableMediaTypes' to 'negotiator.mediaTypes'. So for each request a new Negotiator instances needs to be created and the availableMediaTypes are prepared (at [https://github.com/jshttp/negotiator/blob/master/lib/mediaType.js#L174](https://github.com/jshttp/negotiator/blob/master/lib/mediaType.js#L174))\r\n\r\nThink changing the API constructor and availableMediaTypes is not possible due to backward compatibility. But maybe a new function which allows reusing the availableMediaTypes would be nice.\r\n\r\nThanks and kind regards,\r\nSven"}}
{"actor":{"display_login":"s-ko-mo"}}