fix: allow ClientRequest responses to be throttled (#25531)
* fix: allow net streams to be throttled [WIP] * fix: handle resume throttling within IncomingMessage [WIP] * fix: fix urlLoader typing, add throttle test * fix: fix lint and increase test timeout for Linux * fix: increase test chunk limit to 20 and timeout to 2000 Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
This commit is contained in:
parent
53ee708fe8
commit
6356cd4018
4 changed files with 40 additions and 8 deletions
2
typings/internal-ambient.d.ts
vendored
2
typings/internal-ambient.d.ts
vendored
|
@ -120,7 +120,7 @@ declare namespace NodeJS {
|
|||
|
||||
interface URLLoader extends EventEmitter {
|
||||
cancel(): void;
|
||||
on(eventName: 'data', listener: (event: any, data: ArrayBuffer) => void): this;
|
||||
on(eventName: 'data', listener: (event: any, data: ArrayBuffer, resume: () => void) => void): this;
|
||||
on(eventName: 'response-started', listener: (event: any, finalUrl: string, responseHead: ResponseHead) => void): this;
|
||||
on(eventName: 'complete', listener: (event: any) => void): this;
|
||||
on(eventName: 'error', listener: (event: any, netErrorString: string) => void): this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue