Hi, I am looking for something similar to `Network...
# ktor
r
Hi, I am looking for something similar to
NetworkBehaviour
class in Retrofit in ktor network https://stackoverflow.com/a/35938747 This class basically helps to configure the type of connection and able to return some mock response based on configuration Is there something similar on ktor available
On checking the code of Network Behaviour class, I could say, I can create a custom logic in ktor but if something is available out of the box it would be great
a
Unfortunately, no. You may want to use the
HttpSend
plugin to implement the similar functionality.
r
Is it possible to publish this as a separate plugin just like HttpSendPlugin??
a
Do you mean the
NetworkBehaviour
analog?
r
Yes
a
Yes
r
Cool. Will try to do that
Is there any doc to publish the plugin for ktor?
a
By publishing do you mean to make it available for the users?
r
Yes
a
No, but you can publish it like any other JVM artifact.
r
Ok