<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [BaseService](./ibm-cloud-sdk-core.baseservice.md) &gt; [setEnableGzipCompression](./ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md)

## BaseService.setEnableGzipCompression() method

Turn request body compression on or off.

**Signature:**

```typescript
setEnableGzipCompression(setting: boolean): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

setting


</td><td>

boolean


</td><td>

Will turn it on if 'true', off if 'false'.


</td></tr>
</tbody></table>
**Returns:**

void

