Skip to content

Commit b687242

Browse files
Adds the ability to setup timeouts through client apply method
1 parent afc8738 commit b687242

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/src/main/scala/org/scalaexercises/evaluator/EvaluatorClient.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ class EvaluatorClient(url: String,
2424

2525
object EvaluatorClient {
2626

27-
def apply(url: String, authKey: String) = new EvaluatorClient(url, authKey)
27+
def apply(url: String,
28+
authKey: String,
29+
connTimeout: Duration = 1.second,
30+
readTimeout: Duration = 10.seconds) =
31+
new EvaluatorClient(url, authKey, connTimeout, readTimeout)
2832

2933
implicit class EvaluationIOSyntaxXOR[A](
3034
evalIO: EvalIO[EvaluationResponse[A]]) {

0 commit comments

Comments
 (0)