enum Athena::Routing::URLGeneratorInterface::ReferenceType

Overview

Represents the type of URLs that are able to be generated via an ART::URLGeneratorInterface.

Defined in:

routing/url_generator_interface.cr

Enum Members

Absolute_URL = 0

Includes an absolute URL including protocol, hostname, and path: https://api.example.com/add/10/5.

By default the Host header of the request is used as the hostname, with the scheme being https. This can be customized via the ART::Parameters#base_uri parameter.

!!!note If the base_uri parameter is not set, and there is no Host header, the generated URL will fallback on Absolute_Path.

Absolute_Path = 1

The default type, includes an absolute path from the root to the generated route: /add/10/5.

Relative_Path = 2

TODO Implement this.

Network_Path = 3

Similar to Absolute_URL, but reuses the current protocol: //api.example.com/add/10/5.

Instance Method Summary

Instance Method Detail

def absolute_path? #

[View source]
def absolute_url? #

[View source]
def network_path? #

[View source]
def relative_path? #

[View source]