Module ActionDispatch::Http::URL
In: lib/action_dispatch/http/url.rb

Methods

Public Instance methods

Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". You can specify a different tld_length, such as 2 to catch rubyonrails.co.uk in "www.rubyonrails.co.uk".

Returns the host for this request, such as example.com.

Returns a \host:\port string for this request, such as "example.com" or "example.com:8080".

Returns the port number of this request as an integer.

Returns a \port suffix like ":8080" if the \port number of this request is not the default HTTP \port 80 or HTTPS \port 443.

Returns ‘https://’ if this is an SSL request and ‘http://’ otherwise.

Returns the \host for this request, such as "example.com".

Returns the request URI, accounting for server idiosyncrasies. WEBrick includes the full \URL. IIS leaves REQUEST_URI blank.

Returns ‘https’ if this is an SSL request and ‘http’ otherwise.

Is this an SSL request?

Returns the standard \port number for this request‘s protocol.

Returns whether this request is using the standard port

Returns all the \subdomains as an array, so ["dev", "www"] would be returned for "dev.www.rubyonrails.org". You can specify a different tld_length, such as 2 to catch ["www"] instead of ["www", "rubyonrails"] in "www.rubyonrails.co.uk".

Returns the complete \URL used for this request.

[Validate]