class SLS::Lambda::HTTPResponse
- SLS::Lambda::HTTPResponse
- HTTP::Server::Response
- IO
- Reference
- Object
Defined in:
serverless/lambda/http_response.crConstructors
Instance Method Summary
-
#as_json : JSON::Any
Returns a
JSON::Any
object for passing on to AWS -
#body : String | JSON::Any
Allows accessing the response body directly.
-
#body=(body : String | JSON::Any | Nil)
Setter to allow
ctx.res.body = something
. - #to_json(json : JSON::Builder)
-
#write(slice : Bytes) : Nil
See
IO#write(slice)
.
Constructor Detail
Instance Method Detail
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.
def write(slice : Bytes) : Nil
#
Description copied from class HTTP::Server::Response
See IO#write(slice)
.