So I'm new to ruby and I have a simple REST API.
The post request looks like this:
POST /endpoint, { 'message': 1 }
My lambda handler looks like this:
def run(event:, context:)
puts "#{event['body']}"
# prints the request body
end
I'm trying to figure out how to store message
, which is an int
in a variable.
I was trying to do something like this but doesn't work
my_int = event['body']['message']