public interface TimeoutDirectives
Modifier and Type | Method and Description |
---|---|
Directive<scala.Tuple1<scala.concurrent.duration.Duration>> |
extractRequestTimeout()
Return the currently set request timeout.
|
Directive<scala.runtime.BoxedUnit> |
withoutRequestTimeout() |
Directive<scala.runtime.BoxedUnit> |
withRequestTimeout(scala.concurrent.duration.Duration timeout)
Tries to set a new request timeout and handler (if provided) at the same time.
|
Directive<scala.runtime.BoxedUnit> |
withRequestTimeout(scala.concurrent.duration.Duration timeout,
scala.Function1<HttpRequest,HttpResponse> handler)
Tries to set a new request timeout and handler (if provided) at the same time.
|
Directive<scala.runtime.BoxedUnit> |
withRequestTimeout(scala.concurrent.duration.Duration timeout,
scala.Option<scala.Function1<HttpRequest,HttpResponse>> handler)
Tries to set a new request timeout and handler (if provided) at the same time.
|
Directive<scala.runtime.BoxedUnit> |
withRequestTimeoutResponse(scala.Function1<HttpRequest,HttpResponse> handler)
Tries to set a new request timeout handler, which produces the timeout response for a
given request.
|
Directive<scala.Tuple1<scala.concurrent.duration.Duration>> extractRequestTimeout()
Note that this may be changed in inner directives.
Directive<scala.runtime.BoxedUnit> withoutRequestTimeout()
Directive<scala.runtime.BoxedUnit> withRequestTimeout(scala.concurrent.duration.Duration timeout)
Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!
timeout
- (undocumented)Directive<scala.runtime.BoxedUnit> withRequestTimeout(scala.concurrent.duration.Duration timeout, scala.Function1<HttpRequest,HttpResponse> handler)
Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!
handler
- optional custom "timeout response" function. If left None, the default timeout HttpResponse will be used.
timeout
- (undocumented)Directive<scala.runtime.BoxedUnit> withRequestTimeout(scala.concurrent.duration.Duration timeout, scala.Option<scala.Function1<HttpRequest,HttpResponse>> handler)
Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!
handler
- optional custom "timeout response" function. If left None, the default timeout HttpResponse will be used.
timeout
- (undocumented)Directive<scala.runtime.BoxedUnit> withRequestTimeoutResponse(scala.Function1<HttpRequest,HttpResponse> handler)
Due to the inherent raciness it is not guaranteed that the update will be applied before the previously set timeout has expired!
handler
- (undocumented)