diff --git a/src/client.ts b/src/client.ts index 180a9cb..b166c8a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -472,24 +472,6 @@ export class Gitpod { return url.toString(); } - private calculateContentLength(body: unknown): string | null { - if (typeof body === 'string') { - if (typeof (globalThis as any).Buffer !== 'undefined') { - return (globalThis as any).Buffer.byteLength(body, 'utf8').toString(); - } - - if (typeof (globalThis as any).TextEncoder !== 'undefined') { - const encoder = new (globalThis as any).TextEncoder(); - const encoded = encoder.encode(body); - return encoded.length.toString(); - } - } else if (ArrayBuffer.isView(body)) { - return body.byteLength.toString(); - } - - return null; - } - /** * Used as a callback for mutating the given `FinalRequestOptions` object. */