struct Athena::Routing::Converters::RequestBody(T, P)

Overview

Resolves the request body into type T.

Defined in:

routing/converters.cr
routing/ext/granite.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.convert(ctx : HTTP::Server::Context, body : String) : T #

Special override for Granite ORM to check for existence of a record, and set the deserialized model as not a new record. Will also handle non Granite classes.

Will check the given record exists on PUT, returning a 404 error if it does not exist, or primary_key is not provided.


[View source]

Instance Method Detail

def initialize #

[View source]