Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Url.getOrigin

getOrigin() -> string

Description

Get the origin of the Url.

The origin consists of the scheme, host, and (if applicable) port.

$siteUrl = url'http://mysite.com/path/page'

$siteUrl.getOrigin()
//= 'http://mysite.com'

See Also