Skip to content

Commit 6db2175

Browse files
chore(internal): remove unused method
1 parent e115347 commit 6db2175

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

src/client.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -266,24 +266,6 @@ export class GRID {
266266
return url.toString();
267267
}
268268

269-
private calculateContentLength(body: unknown): string | null {
270-
if (typeof body === 'string') {
271-
if (typeof (globalThis as any).Buffer !== 'undefined') {
272-
return (globalThis as any).Buffer.byteLength(body, 'utf8').toString();
273-
}
274-
275-
if (typeof (globalThis as any).TextEncoder !== 'undefined') {
276-
const encoder = new (globalThis as any).TextEncoder();
277-
const encoded = encoder.encode(body);
278-
return encoded.length.toString();
279-
}
280-
} else if (ArrayBuffer.isView(body)) {
281-
return body.byteLength.toString();
282-
}
283-
284-
return null;
285-
}
286-
287269
/**
288270
* Used as a callback for mutating the given `FinalRequestOptions` object.
289271
*/

0 commit comments

Comments
 (0)