klyn.net.URL.fromObject
method
public static fromObject(value as Object) as URL throws MalformedURLException:
Description
Converts an object to `URL`.
import klyn.net

url = URL.fromObject("https://example.com")
print(url.host)
Parameters
  • value URL instance or textual URL.
Returns
Parsed URL.
Throws
  • MalformedURLException when the value cannot be converted. ```klyn import klyn.net url = URL.fromObject("https://example.com") print(url.host) ```