http
http copied to clipboard
An opinionated framework for scalable web 🌎
I'm getting this error: ```crystal Error in macro 'params' /Users/remivillien/Git/Dwoom/dwoom-account-backend-signup/lib/onyx-http/src/onyx-http/endpoint/params.cr:12, line 19: 1. struct Params 2. # This method is used to copy request body if needed. 3. protected def...
both defined a `status_message`: * [in onyx](https://github.com/onyxframework/http/blob/20411546412f227c505f78c943ff514349706ea7/src/onyx-http/ext/exception/status_message.cr#L5) * [in halite](https://github.com/icyleaf/halite/blob/0306e6fc42fcab70fd7c807329c0d85341e003d2/src/halite/error.cr#L52) How is this usually resolved in Crystal?
```crystal json @worlds.map do |world| Views::World.new(world) end ``` Is treated as builder variant and ```crystal json @worlds.map { |world| Views::World.new(world) } ``` Is not.
```crystal struct MyAction include Onyx::REST::Action params do query do type redirect : Bool end end before do redirect("https://google.com") if params.query.redirect end end ``` Currently the [callbacks.cr](https://github.com/vladfaust/callbacks.cr) shard ignores the callbacks'...
```sh ❯ http localhost:5000\?who="My Name" { "message": "Hello, My%20Name!” } ```
Define static routes in compilation time: ```crystal # It's just a Handler class MyStaticRouter include Onyx::REST::StaticRouter draw do get "/" do will_be_put_explicitly_into_the_code end end end ```