File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -472,24 +472,6 @@ export class Gitpod {
472
472
return url . toString ( ) ;
473
473
}
474
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
475
/**
494
476
* Used as a callback for mutating the given `FinalRequestOptions` object.
495
477
*/
You can’t perform that action at this time.
0 commit comments