{"action":"created","issue":{"url":"https://api.github.com/repos/bloomberg/brisket/issues/140","labels_url":"https://api.github.com/repos/bloomberg/brisket/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/bloomberg/brisket/issues/140/comments","events_url":"https://api.github.com/repos/bloomberg/brisket/issues/140/events","html_url":"https://github.com/bloomberg/brisket/pull/140","id":80046740,"number":140,"title":"forward client requests to apiHost","user":{"login":"claquesous","id":2617521,"avatar_url":"https://avatars.githubusercontent.com/u/2617521?v=3","gravatar_id":"","url":"https://api.github.com/users/claquesous","html_url":"https://github.com/claquesous","followers_url":"https://api.github.com/users/claquesous/followers","following_url":"https://api.github.com/users/claquesous/following{/other_user}","gists_url":"https://api.github.com/users/claquesous/gists{/gist_id}","starred_url":"https://api.github.com/users/claquesous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claquesous/subscriptions","organizations_url":"https://api.github.com/users/claquesous/orgs","repos_url":"https://api.github.com/users/claquesous/repos","events_url":"https://api.github.com/users/claquesous/events{/privacy}","received_events_url":"https://api.github.com/users/claquesous/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-24T04:21:16Z","updated_at":"2015-06-06T16:12:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bloomberg/brisket/pulls/140","html_url":"https://github.com/bloomberg/brisket/pull/140","diff_url":"https://github.com/bloomberg/brisket/pull/140.diff","patch_url":"https://github.com/bloomberg/brisket/pull/140.patch"},"body":"This needs a little more polish, but just putting it out there."},"comment":{"url":"https://api.github.com/repos/bloomberg/brisket/issues/comments/109608438","html_url":"https://github.com/bloomberg/brisket/pull/140#issuecomment-109608438","issue_url":"https://api.github.com/repos/bloomberg/brisket/issues/140","id":109608438,"user":{"login":"wawjr3d","id":1474786,"avatar_url":"https://avatars.githubusercontent.com/u/1474786?v=3","gravatar_id":"","url":"https://api.github.com/users/wawjr3d","html_url":"https://github.com/wawjr3d","followers_url":"https://api.github.com/users/wawjr3d/followers","following_url":"https://api.github.com/users/wawjr3d/following{/other_user}","gists_url":"https://api.github.com/users/wawjr3d/gists{/gist_id}","starred_url":"https://api.github.com/users/wawjr3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wawjr3d/subscriptions","organizations_url":"https://api.github.com/users/wawjr3d/orgs","repos_url":"https://api.github.com/users/wawjr3d/repos","events_url":"https://api.github.com/users/wawjr3d/events{/privacy}","received_events_url":"https://api.github.com/users/wawjr3d/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T16:12:14Z","updated_at":"2015-06-06T16:12:14Z","body":"while using a header to let the brisket server know that the call is an ajax request is powerful since there are no restrictions on api uris, it presents some new challenges. I can think of two off the top of m head:\r\n\r\n* if i want to add a middleware that intercepts all data calls to the apiHost and does some work before passing them along, i will have to reimplement the expectation of the header in my middleware\r\n* inspecting an api response through my brisket application (i.e. going to http://mybrisketapp.com/getsomedata in my browser) is more difficult - i have to send a header along now with curl or poster, etc.\r\n\r\ni think it would be simpler to intercept all calls to \"/api\" or a configurable prefix as calls to the api. what do you think?"}}