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 @@ -237,24 +237,6 @@ export class Lightswitch {
237
237
return url . toString ( ) ;
238
238
}
239
239
240
- private calculateContentLength ( body : unknown ) : string | null {
241
- if ( typeof body === 'string' ) {
242
- if ( typeof ( globalThis as any ) . Buffer !== 'undefined' ) {
243
- return ( globalThis as any ) . Buffer . byteLength ( body , 'utf8' ) . toString ( ) ;
244
- }
245
-
246
- if ( typeof ( globalThis as any ) . TextEncoder !== 'undefined' ) {
247
- const encoder = new ( globalThis as any ) . TextEncoder ( ) ;
248
- const encoded = encoder . encode ( body ) ;
249
- return encoded . length . toString ( ) ;
250
- }
251
- } else if ( ArrayBuffer . isView ( body ) ) {
252
- return body . byteLength . toString ( ) ;
253
- }
254
-
255
- return null ;
256
- }
257
-
258
240
/**
259
241
* Used as a callback for mutating the given `FinalRequestOptions` object.
260
242
*/
You can’t perform that action at this time.
0 commit comments