Method WithHeader
- Namespace
- HttpBuildR
- Assembly
- HttpBuildR.Response.dll
WithHeader(HttpResponseMessage, string, string?)
Adds a header to the response
public static HttpResponseMessage WithHeader(this HttpResponseMessage response, string name, string? value)
Parameters
responseHttpResponseMessageresponse
namestringheader name
valuestringvalue
Returns
- HttpResponseMessage
response
WithHeader(HttpResponseMessage, string, params string[])
Adds a header to the response
public static HttpResponseMessage WithHeader(this HttpResponseMessage response, string name, params string[] values)
Parameters
responseHttpResponseMessageresponse
namestringheader name
valuesstring[]values
Returns
- HttpResponseMessage
response