Skip to content

Commit a4e6d6c

Browse files
committed
deps: use web fetch client only
1 parent 6e118cf commit a4e6d6c

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@
521521
"@smithy/service-error-classification": "^3.0.0",
522522
"@smithy/shared-ini-file-loader": "^3.0.0",
523523
"@smithy/util-retry": "^3.0.0",
524-
"@smithy/node-http-handler": "^3.0.0",
525524
"@smithy/fetch-http-handler": "^3.0.0",
526525
"@vscode/debugprotocol": "^1.57.0",
527526
"@zip.js/zip.js": "^2.7.41",

packages/core/src/shared/awsClientBuilderV3.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
RetryStrategy,
2626
UserAgent,
2727
} from '@aws-sdk/types'
28-
import { NodeHttpHandler } from '@smithy/node-http-handler'
2928
import { FetchHttpHandler } from '@smithy/fetch-http-handler'
3029
import { HttpResponse, HttpRequest } from '@aws-sdk/protocol-http'
3130
import { ConfiguredRetryStrategy } from '@smithy/util-retry'
@@ -35,9 +34,7 @@ import { extensionVersion } from './vscode/env'
3534
import { getLogger } from './logger/logger'
3635
import { partialClone } from './utilities/collectionUtils'
3736
import { selectFrom } from './utilities/tsUtils'
38-
import { Agent } from 'http'
3937
import { once } from './utilities/functionUtils'
40-
import { isWeb } from './extensionGlobals'
4138

4239
export type AwsClientConstructor<C> = new (o: AwsClientOptions) => C
4340

@@ -94,14 +91,9 @@ export class AWSClientBuilderV3 {
9491
}
9592

9693
private buildHttpClient() {
97-
return isWeb()
98-
? new FetchHttpHandler({
99-
keepAlive: true,
100-
})
101-
: new NodeHttpHandler({
102-
httpAgent: new Agent({ keepAlive: true, timeout: 30000 }),
103-
httpsAgent: new Agent({ keepAlive: true, timeout: 30000 }),
104-
})
94+
return new FetchHttpHandler({
95+
keepAlive: true,
96+
})
10597
}
10698

10799
private getHttpClient = once(this.buildHttpClient.bind(this))

0 commit comments

Comments
 (0)