File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ export class FormDataEncoder {
212
212
/**
213
213
* Returns form-data content length
214
214
*/
215
- #getContentLength( ) : number {
215
+ #getContentLength( ) : string {
216
216
let length = 0
217
217
218
218
for ( const [ name , raw ] of this . #form) {
@@ -225,7 +225,7 @@ export class FormDataEncoder {
225
225
length += this . #CRLF_BYTES_LENGTH
226
226
}
227
227
228
- return length + this . #footer. byteLength
228
+ return String ( length + this . #footer. byteLength )
229
229
}
230
230
231
231
/**
@@ -234,7 +234,7 @@ export class FormDataEncoder {
234
234
* @deprecated Use FormDataEncoder.contentLength or FormDataEncoder.headers["Content-Length"] instead
235
235
*/
236
236
getContentLength ( ) : number {
237
- return this . #getContentLength ( )
237
+ return Number ( this . contentLength )
238
238
}
239
239
240
240
/**
You can’t perform that action at this time.
0 commit comments