温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/http/ClientRequest/destroy
点击访问原文链接

ClientRequest.destroy method | Node.js http module | Bun

ClientRequest.destroy method | Node.js http module | BunBuildDocsReferenceGuidesBlogDiscord/node:http/ClientRequest/destroyMdestroy

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:http/ClientRequest/destroyMdestroy

method

http.ClientRequest.destroydestroy(error?: Error): this;Destroy the stream. Optionally emit an 'error' event, and emit a 'close' event (unless emitClose is set to false). After this call, the writable stream has ended and subsequent calls to write() or end() will result in an ERR_STREAM_DESTROYED error. This is a destructive and immediate way to destroy a stream. Previous calls to write() may not have drained, and may trigger an ERR_STREAM_DESTROYED error. Use end() instead of destroy if data should flush before close, or wait for the 'drain' event before destroying the stream.

Once destroy() has been called any further calls will be a no-op and no further errors except from _destroy() may be emitted as 'error'.

Implementors should not override this method, but instead implement writable._destroy().

@param errorOptional, an error to emit with 'error' event.

Referenced typesinterface Errorcause?: unknownThe cause of the error.

message: stringname: stringstack?: string

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录