class SLS::Lambda::HTTPResponse

Defined in:

serverless/lambda/http_response.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(io = IO::Memory.new) #

[View source]

Instance Method Detail

def as_json : JSON::Any #

Returns a JSON::Any object for passing on to AWS


[View source]
def body : String | JSON::Any #

Allows accessing the response body directly.


[View source]
def body=(body : String | JSON::Any | Nil) #

Setter to allow ctx.res.body = something. Specifically used for frameworks that don't mutate the #body such as the Athena extension.


[View source]
def to_json(json : JSON::Builder) #

[View source]
def write(slice : Bytes) : Nil #
Description copied from class HTTP::Server::Response

See IO#write(slice).


[View source]