From bb09ca5ab2a1abab942aa09142d4a1aa5d2c6119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Herv=C3=A9?= Date: Fri, 1 Oct 2021 14:23:43 +0200 Subject: [PATCH 1/3] Document compress flag, change default to uncompress This will align with other SDKs. --- .../templates/http/isomorphic-fetch.mustache | 2 +- README.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.generator/templates/http/isomorphic-fetch.mustache b/.generator/templates/http/isomorphic-fetch.mustache index 3e8e7ad3ca1..537c7320382 100644 --- a/.generator/templates/http/isomorphic-fetch.mustache +++ b/.generator/templates/http/isomorphic-fetch.mustache @@ -18,7 +18,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { let compress = request.getHttpConfig().compress; if (compress === undefined) { - compress = true; + compress = false; } let headers = request.getHeaders(); diff --git a/README.md b/README.md index e0aeb34871e..e3b1a4d7c1f 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,22 @@ apiInstance.getMonitor(params).then((data:any) => { ``` +### Using compressed payloads + +If you want to accept GZIP compressed responses to reduce bandwidth utilization, set the `compress` flag +on your configuration options: + +```typescript +import { v1 } from '@datadog/datadog-api-client'; +const configurationOpts = { + httpConfig: { + compress: true + }, +}; + +const configuration = v1.createConfiguration(configurationOpts); +``` + ## Documentation Documentation for API endpoints can be found under the docs subdirectories, in [v1](/docs/v1/) From 076daae59aa80e5c4270ad0014e77c513f3cf740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Herv=C3=A9?= Date: Mon, 4 Oct 2021 09:06:48 +0200 Subject: [PATCH 2/3] Re-enable --- .generator/templates/http/isomorphic-fetch.mustache | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.generator/templates/http/isomorphic-fetch.mustache b/.generator/templates/http/isomorphic-fetch.mustache index 537c7320382..3e8e7ad3ca1 100644 --- a/.generator/templates/http/isomorphic-fetch.mustache +++ b/.generator/templates/http/isomorphic-fetch.mustache @@ -18,7 +18,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary { let compress = request.getHttpConfig().compress; if (compress === undefined) { - compress = false; + compress = true; } let headers = request.getHeaders(); diff --git a/README.md b/README.md index e3b1a4d7c1f..55dde36a6d6 100644 --- a/README.md +++ b/README.md @@ -39,16 +39,16 @@ apiInstance.getMonitor(params).then((data:any) => { ``` -### Using compressed payloads +### Disable compressed payloads -If you want to accept GZIP compressed responses to reduce bandwidth utilization, set the `compress` flag +If you want to disable GZIP compressed responses, set the `compress` flag on your configuration options: ```typescript import { v1 } from '@datadog/datadog-api-client'; const configurationOpts = { httpConfig: { - compress: true + compress: false }, }; From 9ccf49184a8b8fa1d2fffb328dbdee71bfa19ed8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 7 Oct 2021 07:34:38 +0000 Subject: [PATCH 3/3] Regenerate client from commit 7a4f3f3 of spec repo --- .apigentools-info | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index df0a7e360ab..654b04708e9 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2021-10-01 10:29:33.709287", - "spec_repo_commit": "bc91052" + "regenerated": "2021-10-07 07:33:28.923748", + "spec_repo_commit": "7a4f3f3" }, "v2": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2021-10-01 10:30:17.357619", - "spec_repo_commit": "bc91052" + "regenerated": "2021-10-07 07:34:35.411310", + "spec_repo_commit": "7a4f3f3" } } } \ No newline at end of file