Onyx::HTTP component includes powerful modules to build scalable web applications. It allows to build REST APIs which have separate business logic and rendering layers, type-safe params parsing, greater control flow and also convenient websocket channels. The framework allows a developer to write less code in general, as it comes with meaningful defaults, for example, CORS headers and beautiful logging.


To install Onyx::HTTP, you'll need to add both "onyx" and "onyx-http" into your shard.yml:

    github: onyxframework/onyx
    version: ~> 0.4.0
    github: onyxframework/http
    version: ~> 0.8.0

Then, in your application code:

require "onyx/http"


The Onyx::HTTP guide is split to these sections:

  • Routing demonstates how to draw routes for your application
  • Headers describes HTTP headers set in responses
  • Errors guides through errors rescuing and rendering
  • Views introduces to rendering layer
  • Endpoints shows how to use encapsulated endpoints
  • Channels reveals powerful websocket wrappers