{"action":"created","issue":{"url":"https://api.github.com/repos/mattbrailsford/umbraco-authu/issues/12","repository_url":"https://api.github.com/repos/mattbrailsford/umbraco-authu","labels_url":"https://api.github.com/repos/mattbrailsford/umbraco-authu/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/mattbrailsford/umbraco-authu/issues/12/comments","events_url":"https://api.github.com/repos/mattbrailsford/umbraco-authu/issues/12/events","html_url":"https://github.com/mattbrailsford/umbraco-authu/issues/12","id":234766249,"number":12,"title":"Error 405: The requested resource does not support http method OPTIONS","user":{"login":"biapar","id":661517,"avatar_url":"https://avatars1.githubusercontent.com/u/661517?v=3","gravatar_id":"","url":"https://api.github.com/users/biapar","html_url":"https://github.com/biapar","followers_url":"https://api.github.com/users/biapar/followers","following_url":"https://api.github.com/users/biapar/following{/other_user}","gists_url":"https://api.github.com/users/biapar/gists{/gist_id}","starred_url":"https://api.github.com/users/biapar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biapar/subscriptions","organizations_url":"https://api.github.com/users/biapar/orgs","repos_url":"https://api.github.com/users/biapar/repos","events_url":"https://api.github.com/users/biapar/events{/privacy}","received_events_url":"https://api.github.com/users/biapar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-09T09:07:56Z","updated_at":"2017-06-13T07:18:33Z","closed_at":null,"body":"Hi,\r\n\r\nif you call a method like your example, we receive the error \"The requested resource does not support http method OPTIONS\".\r\nWhy?\r\n\r\n`[Our.Umbraco.AuthU.Web.WebApi.OAuth(\"realmusers\")]\r\n    public class LGIWFPraticheController : UmbracoApiController\r\n    {\r\n\r\n        [HttpGet]\r\n        [Authorize]\r\n        public string HelloWorld()\r\n        {\r\n            return \"Hello \" + Members.GetCurrentMember()?.Name;\r\n        }\r\n\r\n    }`\r\n\r\ncalled by:\r\n ` var token = localStorage.getItem(\"token\");\r\n\r\n    var headers = new Headers();\r\n    headers.append('authorization', 'Bearer ' + token);\r\n \r\n\r\n    let options = new RequestOptions({ headers: headers });\r\n\r\n    let body = JSON.parse('{}');\r\n\r\n  \r\n   return this.http.get('http://localhost:60936/umbraco/api/LGIWFPratiche/helloworld',  options)\r\n                .map(this.handleData)\r\n                .catch(this.handleError);`"},"comment":{"url":"https://api.github.com/repos/mattbrailsford/umbraco-authu/issues/comments/308029287","html_url":"https://github.com/mattbrailsford/umbraco-authu/issues/12#issuecomment-308029287","issue_url":"https://api.github.com/repos/mattbrailsford/umbraco-authu/issues/12","id":308029287,"user":{"login":"biapar","id":661517,"avatar_url":"https://avatars1.githubusercontent.com/u/661517?v=3","gravatar_id":"","url":"https://api.github.com/users/biapar","html_url":"https://github.com/biapar","followers_url":"https://api.github.com/users/biapar/followers","following_url":"https://api.github.com/users/biapar/following{/other_user}","gists_url":"https://api.github.com/users/biapar/gists{/gist_id}","starred_url":"https://api.github.com/users/biapar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biapar/subscriptions","organizations_url":"https://api.github.com/users/biapar/orgs","repos_url":"https://api.github.com/users/biapar/repos","events_url":"https://api.github.com/users/biapar/events{/privacy}","received_events_url":"https://api.github.com/users/biapar/received_events","type":"User","site_admin":false},"created_at":"2017-06-13T07:18:33Z","updated_at":"2017-06-13T07:18:33Z","body":"Hi,\r\nthe problem is server side. How solve?"}}
{"actor":{"display_login":"biapar"}}