Hello,
it’s basically not a question but a clarification to a behaviour that might not be obvious (and took me some time to discover).
You should state in the docs/examples, that one has to add ONE AddHeader-Attribute for EACH single Header-Field even though the Visual Studio code completion (correctly) suggest that the attribute could be initialized with multiple values.
After looking at the sourcecode of AddHeaderAttribute its clear its working that way, but a simple example would help to save some research-time.
Example:
// Doesn't work
[AddHeader(ContentType = "image/png", ContentEncoding = "base64")]
public string Get(TestRequest request)
{
return "123";
}
// Works
[AddHeader(ContentType = "image/png")]
[AddHeader(ContentEncoding = "base64")]
public string Get(TestRequest2 request)
{
return "456";
}
cheers Michael