{"action":"created","issue":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/179","labels_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/179/comments","events_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/179/events","html_url":"https://github.com/bridgedotnet/Bridge/issues/179","id":68566363,"number":179,"title":"AjaxOptions BeforeSend's jqXHR has no 'SetRequestHeader' method","user":{"login":"fabriciomurta","id":10730372,"avatar_url":"https://avatars.githubusercontent.com/u/10730372?v=3","gravatar_id":"","url":"https://api.github.com/users/fabriciomurta","html_url":"https://github.com/fabriciomurta","followers_url":"https://api.github.com/users/fabriciomurta/followers","following_url":"https://api.github.com/users/fabriciomurta/following{/other_user}","gists_url":"https://api.github.com/users/fabriciomurta/gists{/gist_id}","starred_url":"https://api.github.com/users/fabriciomurta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabriciomurta/subscriptions","organizations_url":"https://api.github.com/users/fabriciomurta/orgs","repos_url":"https://api.github.com/users/fabriciomurta/repos","events_url":"https://api.github.com/users/fabriciomurta/events{/privacy}","received_events_url":"https://api.github.com/users/fabriciomurta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bridgedotnet/Bridge/labels/defect","name":"defect","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"DaniilVeriga","id":1510884,"avatar_url":"https://avatars.githubusercontent.com/u/1510884?v=3","gravatar_id":"","url":"https://api.github.com/users/DaniilVeriga","html_url":"https://github.com/DaniilVeriga","followers_url":"https://api.github.com/users/DaniilVeriga/followers","following_url":"https://api.github.com/users/DaniilVeriga/following{/other_user}","gists_url":"https://api.github.com/users/DaniilVeriga/gists{/gist_id}","starred_url":"https://api.github.com/users/DaniilVeriga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaniilVeriga/subscriptions","organizations_url":"https://api.github.com/users/DaniilVeriga/orgs","repos_url":"https://api.github.com/users/DaniilVeriga/repos","events_url":"https://api.github.com/users/DaniilVeriga/events{/privacy}","received_events_url":"https://api.github.com/users/DaniilVeriga/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/milestones/6","html_url":"https://github.com/bridgedotnet/Bridge/milestones/1.3","labels_url":"https://api.github.com/repos/bridgedotnet/Bridge/milestones/6/labels","id":1056642,"number":6,"title":"1.3","description":"","creator":{"login":"geoffreymcgill","id":62210,"avatar_url":"https://avatars.githubusercontent.com/u/62210?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffreymcgill","html_url":"https://github.com/geoffreymcgill","followers_url":"https://api.github.com/users/geoffreymcgill/followers","following_url":"https://api.github.com/users/geoffreymcgill/following{/other_user}","gists_url":"https://api.github.com/users/geoffreymcgill/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffreymcgill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffreymcgill/subscriptions","organizations_url":"https://api.github.com/users/geoffreymcgill/orgs","repos_url":"https://api.github.com/users/geoffreymcgill/repos","events_url":"https://api.github.com/users/geoffreymcgill/events{/privacy}","received_events_url":"https://api.github.com/users/geoffreymcgill/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":8,"state":"open","created_at":"2015-04-07T16:58:27Z","updated_at":"2015-04-20T22:12:01Z","due_on":"2015-04-20T06:00:00Z","closed_at":null},"comments":3,"created_at":"2015-04-15T03:55:05Z","updated_at":"2015-04-20T22:12:53Z","closed_at":"2015-04-20T22:12:01Z","body":"This issue was identified while attending this forum post:\r\n[Jquery Ajax call - with basic Authentication](http://forums.bridge.net/forum/community/help/168)\r\n\r\n`AjaxOptions.BeforeSend` property's prototype is:\r\n`System.Func<Bridge.jQuery2.jqXHR,object,boot>`\r\n\r\nAccording to [this stackoverflow](http://stackoverflow.com/questions/14010851/set-request-header-jquery-ajax) discussion, `jqXHR` should accept a `SetRequestHeader(string, string)` call.\r\n\r\n`jqXHR` class in turn does not have method stub for `SetRequestHeader`.\r\nThis method definition was found in `Bridge.Html5.XMLHttpRequest`. The signature is exactly as used in the stackoverflow discussion above.\r\n\r\nTrying to just `jqXHR.ToDynamic()` triggers the bug #178.\r\n\r\nWith that said, what would be best to address this issue and improve user experience:\r\na. Change `AjaxOptions.BeforeSend` type to `Func<Bridge.Html5.XMLHttpRequest,object,bool>`?\r\nb. Change `Bridge.jQuery2.jqXHR` to inherit from `Bridge.Html5.XMLHttpRequest`?\r\nc. Implement the method stubs to `Bridge.jQuery2.jqXHR`?\r\nd. Just fix #178 and set it as a dynamic type, as the parameter may have unexpected/custom properties?\r\ne. Your suggestion here: _____________________________________"},"comment":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/comments/94581412","html_url":"https://github.com/bridgedotnet/Bridge/issues/179#issuecomment-94581412","issue_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/179","id":94581412,"user":{"login":"DaniilVeriga","id":1510884,"avatar_url":"https://avatars.githubusercontent.com/u/1510884?v=3","gravatar_id":"","url":"https://api.github.com/users/DaniilVeriga","html_url":"https://github.com/DaniilVeriga","followers_url":"https://api.github.com/users/DaniilVeriga/followers","following_url":"https://api.github.com/users/DaniilVeriga/following{/other_user}","gists_url":"https://api.github.com/users/DaniilVeriga/gists{/gist_id}","starred_url":"https://api.github.com/users/DaniilVeriga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaniilVeriga/subscriptions","organizations_url":"https://api.github.com/users/DaniilVeriga/orgs","repos_url":"https://api.github.com/users/DaniilVeriga/repos","events_url":"https://api.github.com/users/DaniilVeriga/events{/privacy}","received_events_url":"https://api.github.com/users/DaniilVeriga/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T22:12:53Z","updated_at":"2015-04-20T22:12:53Z","body":"Inherited jqXHR from XMLHttpRequest and repeated the Deffered API methods."}}