# withTransformResponseHeader

- Module: [Aspire.Hosting.Yarp](/reference/api/typescript/aspire.hosting.yarp.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

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

## Definition

```typescript
interface YarpRoute {
  // ... omitted for brevity
  withTransformResponseHeader(
    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)

## Applies to

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