Open ronnybremer opened 1 month ago
Fixes #3
However, I am afraid if we want to clean this up for good, we'd need to change the "exiting" behavior as well (see comment below)
Quite right. It's always a struggle with examples, as they are for demonstration and not really high quality code.
I don't want to be too pedantic on a silly little example like this, but I think it reads less cleanly than before.
Would you mind refactoring the while-loop to work without
exit
and have a singleshutdown
.
What do you think, is this better?
See https://github.com/swift-server/async-http-client/blob/main/README.md#request-response-api