{"action":"opened","issue":{"url":"https://api.github.com/repos/proudmonkey/AutoWrapper/issues/14","repository_url":"https://api.github.com/repos/proudmonkey/AutoWrapper","labels_url":"https://api.github.com/repos/proudmonkey/AutoWrapper/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/proudmonkey/AutoWrapper/issues/14/comments","events_url":"https://api.github.com/repos/proudmonkey/AutoWrapper/issues/14/events","html_url":"https://github.com/proudmonkey/AutoWrapper/issues/14","id":523862991,"node_id":"MDU6SXNzdWU1MjM4NjI5OTE=","number":14,"title":"ApiResponse doesn't return statusCode","user":{"login":"trinvh","id":8091072,"node_id":"MDQ6VXNlcjgwOTEwNzI=","avatar_url":"https://avatars3.githubusercontent.com/u/8091072?v=4","gravatar_id":"","url":"https://api.github.com/users/trinvh","html_url":"https://github.com/trinvh","followers_url":"https://api.github.com/users/trinvh/followers","following_url":"https://api.github.com/users/trinvh/following{/other_user}","gists_url":"https://api.github.com/users/trinvh/gists{/gist_id}","starred_url":"https://api.github.com/users/trinvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trinvh/subscriptions","organizations_url":"https://api.github.com/users/trinvh/orgs","repos_url":"https://api.github.com/users/trinvh/repos","events_url":"https://api.github.com/users/trinvh/events{/privacy}","received_events_url":"https://api.github.com/users/trinvh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-11-16T16:08:37Z","updated_at":"2019-11-16T16:08:37Z","closed_at":null,"author_association":"NONE","body":"The issue is the title. The response header is missing status code. Only occurs with *ApiResponse*\r\n\r\nThe example code:\r\n```\r\npublic async Task<ApiResponse> Register([FromBody] RegisterViewModel model)\r\n        {\r\n            if (!ModelState.IsValid)\r\n            {\r\n                throw new ApiException(ModelState.AllErrors());\r\n            }\r\n            var user = mapper.Map<ApplicationUser>(model);\r\n            if (await userManager.FindByEmailAsync(model.Email) != null)\r\n            {\r\n                throw new ApiException(\"Email is already taken\", 400);\r\n            }\r\n            if (await userManager.FindByNameAsync(model.Username) != null)\r\n            {\r\n                throw new ApiException(\"Username is already taken\", 400);\r\n            }\r\n            await userManager.CreateAsync(user, model.Password);\r\n            return new ApiResponse(\"Register successfully\", new UserTransformer(user), 200);\r\n        }\r\n```"}}
{"actor":{"display_login":"trinvh"}}