{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/1722","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/1722/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/1722/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/1722/events","html_url":"https://github.com/aspnet/Mvc/issues/1722","id":51940550,"number":1722,"title":"Properties marked with `[FromHeader]` attribute do not use default values when a header is not present","user":{"login":"pranavkm","id":174281,"avatar_url":"https://avatars.githubusercontent.com/u/174281?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavkm","html_url":"https://github.com/pranavkm","followers_url":"https://api.github.com/users/pranavkm/followers","following_url":"https://api.github.com/users/pranavkm/following{/other_user}","gists_url":"https://api.github.com/users/pranavkm/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavkm/subscriptions","organizations_url":"https://api.github.com/users/pranavkm/orgs","repos_url":"https://api.github.com/users/pranavkm/repos","events_url":"https://api.github.com/users/pranavkm/events{/privacy}","received_events_url":"https://api.github.com/users/pranavkm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/3+-+Working","name":"3 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/aspnet/Mvc/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"rynowak","id":1430011,"avatar_url":"https://avatars.githubusercontent.com/u/1430011?v=3","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/Mvc/milestones/7","labels_url":"https://api.github.com/repos/aspnet/Mvc/milestones/7/labels","id":668490,"number":7,"title":"6.0.0-beta3","description":"","creator":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"open_issues":136,"closed_issues":38,"state":"open","created_at":"2014-05-23T23:00:12Z","updated_at":"2015-01-13T23:54:26Z","due_on":"2015-01-19T08:00:00Z","closed_at":null},"comments":3,"created_at":"2014-12-15T01:32:44Z","updated_at":"2015-01-13T23:57:25Z","closed_at":null,"body":"Consider:\r\n\r\n```C#\r\n\r\npublic class ModelBoundType\r\n{\r\n     [FromHeader(\"Test-Header\")]\r\n     public string TestHeader { get; set;} = \"Default-Value\";\r\n\r\n     public string TestModelBoundValue { get; set; } = \"Default Value\";\r\n```\r\n\r\n`TestModelBoundValue` picks up the default value when a value for the property is not found. `TestHeader` stays null when the a header is absent. "},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/69845923","html_url":"https://github.com/aspnet/Mvc/issues/1722#issuecomment-69845923","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/1722","id":69845923,"user":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T23:57:25Z","updated_at":"2015-01-13T23:57:25Z","body":"The suggestion is to fix this by changing the context to have another flag that indicates if a value was produced. This flag will be set to `true` by default if the value setter was invoked."}}