diff --git a/index.d.ts b/index.d.ts index aeafce7c..b6adb627 100644 --- a/index.d.ts +++ b/index.d.ts @@ -181,6 +181,10 @@ export interface HttpResponse { /** Handler for reading data from POST and such requests. You MUST copy the data of chunk if isLast is not true. We Neuter ArrayBuffers on return, making it zero length.*/ onData(handler: (chunk: ArrayBuffer, isLast: boolean) => void) : HttpResponse; + /** Accumulates all data chunks and calls handler with the complete body as an ArrayBuffer once all data has arrived. + * If the total body size exceeds maxSize bytes, handler is called with null instead. */ + onFullData(maxSize: number, handler: (fullBody: ArrayBuffer | null) => void) : HttpResponse; + /** Returns the remote IP address in binary format (4 or 16 bytes). */ getRemoteAddress() : ArrayBuffer; diff --git a/source_commit b/source_commit index 9c0c11b5..0208ab12 100644 --- a/source_commit +++ b/source_commit @@ -1 +1 @@ -a11eb9df1edb70e925d6bd4f196f0ef946de3a2e +b0a1028301d6a5df06f1db3f649503d4f470483b diff --git a/uws_linux_x64_115.node b/uws_linux_x64_115.node index dd0deaf0..e68676f5 100644 Binary files a/uws_linux_x64_115.node and b/uws_linux_x64_115.node differ diff --git a/uws_linux_x64_127.node b/uws_linux_x64_127.node index 5c035c4d..246ff681 100644 Binary files a/uws_linux_x64_127.node and b/uws_linux_x64_127.node differ diff --git a/uws_linux_x64_137.node b/uws_linux_x64_137.node index b69ec6c1..a4d61eb9 100644 Binary files a/uws_linux_x64_137.node and b/uws_linux_x64_137.node differ diff --git a/uws_linux_x64_141.node b/uws_linux_x64_141.node index 0396c98a..6da98b62 100644 Binary files a/uws_linux_x64_141.node and b/uws_linux_x64_141.node differ