billbogaiv / hybrid-model-binding

Provides the ability to bind models using both ModelBinder and ValueProvider in ASP.NET Core.
MIT License
104 stars 19 forks source link

Add Header ValueProvider #24

Closed billbogaiv closed 5 years ago

billbogaiv commented 5 years ago

New behavior mimics existing ASP.NET MVC behavior of QueryString and Form value providers. Not really sure why this isn't included in that package. Didn't do thorough testing, but did notice one gotcha if identical header-keys are submitted: the values are combined as a single comma-separated string.

Implements https://github.com/billbogaiv/hybrid-model-binding/issues/23

billbogaiv commented 5 years ago

Quasi-related: https://github.com/aspnet/Mvc/issues/5859