This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Timeouts { | |
| class Config(var postRequestTimeout: Long = 5000L) | |
| companion object : ApplicationFeature<ApplicationCallPipeline, Config, Unit> { | |
| override val key: AttributeKey<Unit> = AttributeKey("Timeouts") | |
| override fun install(pipeline: ApplicationCallPipeline, configure: Config.() -> Unit) { | |
| val postTimeout = Config().apply(configure).postRequestTimeout | |
| if (postTimeout <= 0) return |
OlderNewer