diff --git a/changelog.md b/changelog.md index 9bec0c47a8f49..52b202d8c442b 100644 --- a/changelog.md +++ b/changelog.md @@ -65,7 +65,8 @@ ## Library changes -- `asynchttpserver` now the request body is a FutureStream. +- `asynchttpserver` added an iterator that allows the request body to be read in + chunks of data when new server "stream" option is set to true. - `asyncdispatch.drain` now properly takes into account `selector.hasPendingOperations` and only returns once all pending async operations are guaranteed to have completed. - `asyncdispatch.drain` now consistently uses the passed timeout value for all diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim index 5292ac75ae6bc..9aed0255bbf36 100644 --- a/lib/pure/asynchttpserver.nim +++ b/lib/pure/asynchttpserver.nim @@ -41,13 +41,13 @@ ## import asynchttpserver, asyncdispatch ## import strutils, strformat ## +## const stream = true # for test purposes switch from true to false +## ## proc htmlpage(contentLength, bodyLength: int): string = ## return &""" ## ## -##
-## -## +## ## ##