Super simple ApiController:
[ApiController][Route("[controller]")]public class MyController : ControllerBase{ [HttpPost] public IActionResult DoStuff([FromHeader] string X-SomeValue) { return Ok(); }}
This does not compile, as X-SomeValue
is not a valid parameter name.The easiest is just call it XSomeValue
, but AFAIK best practise is use X-
.
How can I use X-SomeValue
in the header?