0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Add a use case to loop handlers

This commit is contained in:
Loïc Hoguin 2018-11-14 15:57:38 +01:00
parent 637a9b3924
commit c65e3ff20e
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -14,7 +14,8 @@ most known example of such practice is known as long polling.
Loop handlers can also be used for requests where a response is
partially available and you need to stream the response body
while the connection is open. The most known example of such
practice is server-sent events.
practice is server-sent events, but it also applies to any
response that takes a long time to send.
While the same can be accomplished using plain HTTP handlers,
it is recommended to use loop handlers because they are well-tested