When moving a project into .Net Core, AddHeader
throws an error:
Error CS1061 \'HttpResponse\' does not contain a definition for \'Add
Checkout
Examples:
string combineValue = httpContext.Request.Headers["header1];
if (string.IsNullOrEmpty(combineValue)) // ...
var values = httpContext.Request.Headers["header1"];
if (StringValues.IsNullOrEmpty(values)) // ...
httpContext.Response.Headers["CustomHeader1"] = "singleValue";
httpContext.Response.Headers["CustomHeader2"] = new[] { "firstValue", "secondValue" };