module Azu::Endpoint(Request, Response)


An Endpoint is an endpoint that handles incoming HTTP requests for a specific route. In a Azu application, an endpoint is a simple testable object.

This design provides self contained actions that don’t share their context accidentally with other actions. It also prevents gigantic controllers. It has several advantages in terms of testability and control of an endpoint.

module ExampleApp
  class UserEndpoint
    include Azu::Endpoint(UserRequest, UserResponse)

Included Modules

Defined in:


Instance Method Summary

Instance Method Detail

abstract def call : Response #

When we include Endpoint module, we make our object compliant with Azu Endpoints by implementing the #call, which is a method that accepts no arguments

def call : IndexPage

[View source]