Join Slack
Communities
Powered by
Hi there. Is it possible to configurate/simulate a...
# ktor
u
ubu
04/28/2018, 12:00 PM
Hi there. Is it possible to configurate/simulate a slow server response for the whole ktor project?
o
orangy
04/28/2018, 12:02 PM
You can install a trivial interceptor into the call pipeline and issue a constant (or random)
delay
u
ubu
04/28/2018, 12:04 PM
@orangy
,thanks. do you have any examples somewhere?
o
orangy
04/28/2018, 12:09 PM
not for this specific case, but take a look
https://ktor.io/servers/application.html#applicationcall
u
ubu
04/28/2018, 12:37 PM
thanks
d
Deactivated User
04/28/2018, 1:47 PM
I have created a sample to show how to do this:
https://github.com/ktorio/ktor-samples/blob/master/other/simulate-slow-server/src/SimulateSlowServerApplication.kt#L16
3
Views
Open in Slack
Previous
Next