struct DppmRestApi::Actions::RelativeRoute

Defined in:

actions/relative_route.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(root_path : String) #

[View source]
def self.new(root_path : String, &) : RelativeRoute #

[View source]

Class Method Detail

def self.encode(user_info) #

[View source]

Instance Method Detail

def relative_delete(route : String? = nil, &block : HTTP::Server::Context, Config::User -> ) #

Perform a relative delete from the #root_path. That is, these routes are namespaced underneath a route generated by the name of the type this method is included on. If a route is defined with

delete("/some/:path") { ... }

Then the actual path a request should be made on is "@root_path/some/path-param"


[View source]
def relative_get(route : String? = nil, &block : HTTP::Server::Context, Config::User -> ) #

Perform a relative get from the #root_path. That is, these routes are namespaced underneath a route generated by the name of the type this method is included on. If a route is defined with

get("/some/:path") { ... }

Then the actual path a request should be made on is "@root_path/some/path-param"


[View source]
def relative_options(route : String? = nil, &block : HTTP::Server::Context, Config::User -> ) #

Perform a relative options from the #root_path. That is, these routes are namespaced underneath a route generated by the name of the type this method is included on. If a route is defined with

options("/some/:path") { ... }

Then the actual path a request should be made on is "@root_path/some/path-param"


[View source]
def relative_post(route : String? = nil, &block : HTTP::Server::Context, Config::User -> ) #

Perform a relative post from the #root_path. That is, these routes are namespaced underneath a route generated by the name of the type this method is included on. If a route is defined with

post("/some/:path") { ... }

Then the actual path a request should be made on is "@root_path/some/path-param"


[View source]
def relative_put(route : String? = nil, &block : HTTP::Server::Context, Config::User -> ) #

Perform a relative put from the #root_path. That is, these routes are namespaced underneath a route generated by the name of the type this method is included on. If a route is defined with

put("/some/:path") { ... }

Then the actual path a request should be made on is "@root_path/some/path-param"


[View source]
def root_path : String #

[View source]