From 8f5383157d8ba3fb1e7a5caacca965155fef8338 Mon Sep 17 00:00:00 2001 From: Dmytro Kulyk Date: Wed, 11 Aug 2021 13:09:50 +0300 Subject: [PATCH] Added closeConnection to HttpResponse::end() (#596) https://github.com/uNetworking/uWebSockets.js/blob/master/src/HttpResponseWrapper.h#L218-L220 --- docs/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.d.ts b/docs/index.d.ts index fc3f393..46b64d0 100644 --- a/docs/index.d.ts +++ b/docs/index.d.ts @@ -146,7 +146,7 @@ export interface HttpResponse { /** Enters or continues chunked encoding mode. Writes part of the response. End with zero length write. */ write(chunk: RecognizedString) : HttpResponse; /** Ends this response by copying the contents of body. */ - end(body?: RecognizedString) : HttpResponse; + end(body?: RecognizedString, closeConnection?: boolean) : HttpResponse; /** Ends this response, or tries to, by streaming appropriately sized chunks of body. Use in conjunction with onWritable. Returns tuple [ok, hasResponded].*/ tryEnd(fullBodyOrChunk: RecognizedString, totalSize: number) : [boolean, boolean];