url

fun url(url: URL, optional: Boolean = this.optional): Config

Returns a child config containing values from specified url.

Format of the url is auto-detected from the url extension. Supported url formats and the corresponding extensions:

  • HOCON: conf

  • JSON: json

  • Properties: properties

  • TOML: toml

  • XML: xml

  • YAML: yml, yaml

Throws UnsupportedExtensionException if the url extension is unsupported.

Return

a child config containing values from specified url

Parameters

url

specified url

optional

whether the source is optional

Throws

fun url(url: String, optional: Boolean = this.optional): Config

Returns a child config containing values from specified url string.

Format of the url is auto-detected from the url extension. Supported url formats and the corresponding extensions:

  • HOCON: conf

  • JSON: json

  • Properties: properties

  • TOML: toml

  • XML: xml

  • YAML: yml, yaml

Throws UnsupportedExtensionException if the url extension is unsupported.

Return

a child config containing values from specified url string

Parameters

url

specified url string

optional

whether the source is optional

Throws