# ContentHandling

- Source: [`aws-apigateway/lib/integration.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigateway/lib/integration.ts#L297)

## Example

```ts
declare const getBookHandler: lambda.Function;
declare const getBookIntegration: apigateway.LambdaIntegration;

const getBookIntegration = new apigateway.LambdaIntegration(getBookHandler, {
  contentHandling: apigateway.ContentHandling.CONVERT_TO_TEXT, // convert to base64
  credentialsPassthrough: true, // use caller identity to invoke the function
});
```

## Members

| Member | Description |
| --- | --- |
| `CONVERT_TO_BINARY` | Converts a request payload from a base64-encoded string to a binary blob. |
| `CONVERT_TO_TEXT` | Converts a request payload from a binary blob to a base64-encoded string. |

## Referenced by

- [`IntegrationOptions`](/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationOptions).contentHandling
- [`IntegrationResponse`](/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse).contentHandling
