Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithTransformResponseHeader

Method
📦 Aspire.Hosting.Yarp v17.0.0
func (YarpRoute) WithTransformResponseHeader(
headerName string,
value string,
options ...*WithTransformResponseHeaderOptions,
) YarpRoute

Signature

methodWithTransformResponseHeader
Adds the transform which will append or set the response header.
WithTransformResponseHeader(
headerName string,
value string,
options ...*WithTransformResponseHeaderOptions,
) YarpRoute
headerNamestring
valuestring
options...*WithTransformResponseHeaderOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithTransformResponseHeaderOptions argument.

Append*bool
Condition*ResponseCondition
YarpRoute

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: