Skip to content

Commit fb1d86e

Browse files
chore(internal): remove unused method (#3)
1 parent ca64fd8 commit fb1d86e

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/client.ts

-18
Original file line numberDiff line numberDiff line change
@@ -472,24 +472,6 @@ export class Gitpod {
472472
return url.toString();
473473
}
474474

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-
493475
/**
494476
* Used as a callback for mutating the given `FinalRequestOptions` object.
495477
*/

0 commit comments

Comments
 (0)