UrlSource

constructor(source: String, connectTimeout: Duration = DEFAULT_CONNECT_TIMEOUT, readTimeout: Duration = DEFAULT_READ_TIMEOUT)

Parameters

source

the URL to read content from

connectTimeout

the maximum time to wait for a connection (default 10 seconds)

readTimeout

the maximum time to wait for data once connected (default 30 seconds)


constructor(source: String)

Creates a UrlSource with the default timeouts.


constructor(source: String, connectTimeout: Duration, readTimeout: Duration)

Creates a UrlSource with timeouts given as java.time.Duration, for Java callers: the constructor taking Kotlin durations cannot be called from Java.

Parameters

source

the URL to read content from

connectTimeout

the maximum time to wait for a connection

readTimeout

the maximum time to wait for data once connected