# YarpRoute.withTransformResponseTrailer

- Module: [Aspire.Hosting.Yarp](/reference/api/typescript/aspire.hosting.yarp.md)
- Defined on: [YarpRoute](/reference/api/typescript/aspire.hosting.yarp/yarproute.md)
- Version: `13.4.0`
- Kind: `method`

Adds the transform which will append or set the response trailer.

## Definition

```typescript
interface YarpRoute {
  // ... omitted for brevity
  withTransformResponseTrailer(
      headerName: string,
      value: string,
      append?: boolean,
      condition?: ResponseCondition): YarpRoute;
}
```

## Signature

```typescript
withTransformResponseTrailer(
    headerName: string,
    value: string,
    append?: boolean,
    condition?: ResponseCondition): YarpRoute
```

## Parameters

- `headerName` (`string`)
- `value` (`string`)
- `append` (`boolean`) `optional` `= True`
- `condition` (`ResponseCondition`) `optional` `= Success`

## Returns

[YarpRoute](/reference/api/typescript/aspire.hosting.yarp/yarproute.md)

## Defined on

- [YarpRoute](/reference/api/typescript/aspire.hosting.yarp/yarproute.md) -- `handle`
