Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Properties marked with [FromHeader] attribute do not use default values when a header is not present #1722

@pranavkm

Description

@pranavkm

Consider:

public class ModelBoundType
{
     [FromHeader("Test-Header")]
     public string TestHeader { get; set;} = "Default-Value";

     public string TestModelBoundValue { get; set; } = "Default Value";

TestModelBoundValue picks up the default value when a value for the property is not found. TestHeader stays null when the a header is absent.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions