HttpRequest.withHeader
HttpRequest withHeader(string name, string value) constReturns a copy of this request with an additional/replaced header.
Parameters
name | Header name; must not be empty. |
value | Header value. |
Returns
The modified copy; the original request is unchanged.
Throws
HttpException when
name is empty.