How do i bind an object from header. Am using the [FromHeader(Name = "Custom-Object")]
but it seems to only be able to bind strings and sting arrays. Do i need to write custom binding or am i missing something here? I wonder why fromheader cannot bind complex object like frombody?
Write custom binder by using IModelBinder and IModelBinderProvider that should resolve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With