# ResponseTransformExtensions

- Kind: `class`
- Package: [Aspire.Hosting.Yarp](/reference/api/csharp/aspire.hosting.yarp.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Yarp.Transforms`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Yarp/ConfigurationBuilder/Transforms/ResponseTransformExtensions.cs)

Extensions for adding response header and trailer transforms.

## Definition

```csharp
namespace Aspire.Hosting.Yarp.Transforms;

public static class ResponseTransformExtensions
{
    // ...
}
```

## Methods

- [WithTransformCopyResponseHeaders(YarpRoute, bool)](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformcopyresponseheaders-yarproute-bool) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will enable or suppress copying response headers to the client response.
- [WithTransformCopyResponseTrailers(YarpRoute, bool)](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformcopyresponsetrailers-yarproute-bool) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will enable or suppress copying response trailers to the client response.
- [WithTransformResponseHeader(YarpRoute, string, string, bool, ResponseCondition)](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformresponseheader-yarproute-string-string-bool-responsecondition) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will append or set the response header.
- [WithTransformResponseHeaderRemove(YarpRoute, string, ResponseCondition)](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformresponseheaderremove-yarproute-string-responsecondition) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will remove the response header.
- [WithTransformResponseHeadersAllowed(YarpRoute, string[])](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformresponseheadersallowed-yarproute-string) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will only copy the allowed response headers. Other transforms that modify or append to existing headers may be affected if not included in the allow list.
- [WithTransformResponseTrailer(YarpRoute, string, string, bool, ResponseCondition)](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformresponsetrailer-yarproute-string-string-bool-responsecondition) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will append or set the response trailer.
- [WithTransformResponseTrailerRemove(YarpRoute, string, ResponseCondition)](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformresponsetrailerremove-yarproute-string-responsecondition) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will remove the response trailer.
- [WithTransformResponseTrailersAllowed(YarpRoute, string[])](/reference/api/csharp/aspire.hosting.yarp/responsetransformextensions/methods.md#withtransformresponsetrailersallowed-yarproute-string) : [YarpRoute](/reference/api/csharp/aspire.hosting.yarp/yarproute.md) `extension` `ats export` -- Adds the transform which will only copy the allowed response trailers. Other transforms that modify or append to existing trailers may be affected if not included in the allow list.
