annotation HTTP::Param

Overview

An HTTP parameter annotation.

Options:

require "http-params-parseable"
require "http-params-parseable/ext/time/epoch_converter"

struct MyParams
  include HTTP::Params::Serializable

  @[HTTP::Param(converter: Time::EpochConverter, key: "theTime")]
  getter time : Array(Time)
end

params = MyParams.from_query("theTime[]=1544958806")
pp params.time.class # => Array(Time)

Defined in:

http-params-serializable/annotations.cr