Skip to content

Commit 736c5e6

Browse files
committed
Clarify write-body-to-stream docstring
Explicitly state that the output stream may be written to asynchronously in the write-body-to-stream docstring. This allows for asynchronous channels or streams to be returned as a response body. Previously it may not have been obvious that this was possible behavior.
1 parent b8a814a commit 736c5e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ring-core/src/ring/core/protocols.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"A protocol for writing data to the response body via an output stream."
1010
(write-body-to-stream [body response output-stream]
1111
"Write a value representing a response body to an output stream. The stream
12-
will be closed after the value had been written."))
12+
will be closed after the value had been written. The stream may be written
13+
asynchronously."))
1314

1415
(defn- ^Writer response-writer [response output-stream]
1516
(if-let [charset (response/get-charset response)]

0 commit comments

Comments
 (0)