We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca64fd8 commit fb1d86eCopy full SHA for fb1d86e
src/client.ts
@@ -472,24 +472,6 @@ export class Gitpod {
472
return url.toString();
473
}
474
475
- private calculateContentLength(body: unknown): string | null {
476
- if (typeof body === 'string') {
477
- if (typeof (globalThis as any).Buffer !== 'undefined') {
478
- return (globalThis as any).Buffer.byteLength(body, 'utf8').toString();
479
- }
480
-
481
- if (typeof (globalThis as any).TextEncoder !== 'undefined') {
482
- const encoder = new (globalThis as any).TextEncoder();
483
- const encoded = encoder.encode(body);
484
- return encoded.length.toString();
485
486
- } else if (ArrayBuffer.isView(body)) {
487
- return body.byteLength.toString();
488
489
490
- return null;
491
492
493
/**
494
* Used as a callback for mutating the given `FinalRequestOptions` object.
495
*/
0 commit comments