This commit is contained in:
2025-07-29 15:44:04 +00:00
parent b4769e7feb
commit 1991308d4a
8 changed files with 114 additions and 36 deletions

View File

@@ -195,6 +195,15 @@ export class SmartRequest<T = any> {
return this;
}
/**
* Enable or disable auto-drain for unconsumed response bodies (Node.js only)
* Default is true to prevent socket hanging
*/
autoDrain(enabled: boolean): this {
this._options.autoDrain = enabled;
return this;
}
/**
* Set the Accept header to indicate what content type is expected
*/