struct Athena::Converters::RequestBody(T)

Overview

Resolves the request body into type T.

Defined in:

converters.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.convert(body : String) : T #

Deserializes the request body into an object of T. Raises a CrSerializer::Exceptions::ValidationException if the object is not valid.

NOTE Requires T to include CrSerializer or implements a self.deserialize(body : String) : self method to instantiate the object from the request body.


[View source]

Instance Method Detail

def initialize #

[View source]