Added closeConnection to HttpResponse::end() (#596)

https://github.com/uNetworking/uWebSockets.js/blob/master/src/HttpResponseWrapper.h#L218-L220
This commit is contained in:
Dmytro Kulyk 2021-08-11 13:09:50 +03:00 committed by GitHub
parent d2d70bd35f
commit 8f5383157d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
docs/index.d.ts vendored
View File

@ -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];