Hi Team , I have a Kotlin Notebook code cell. I ha...
# server
m
Hi Team , I have a Kotlin Notebook code cell. I have this api. i want to set a timeout here, the default is 10s. I don't want that.
Copy code
val response = http.get("<http://127.0.0.1:8080/v1/flashcards?topic=Something&type=quiz&difficulty=hard>")
response.bodyAsText()
Can anyone help?
k
Maybe better chance of getting an answer in the #C05333T208Y channel, but as already mentioned you can configure your own client like this:
Copy code
val httClient = http.config {
	install(HttpTimeout) {
		requestTimeoutMillis = 1000
	}
}
Ref https://github.com/Kotlin/kotlin-jupyter-http-util?tab=readme-ov-file#ktor-http-client-integration