Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to parse header in node.js lambda

{
    "method": "$context.httpMethod",
    "body" : $input.json('$'),
    "headers": {
        #foreach($param in $input.params().header.keySet())
        "$param": "$util.escapeJavaScript($input.params().header.get($param))"
        #if($foreach.hasNext),#end
        #end
    }
}
Source by aws.amazon.com #
 
PREVIOUS NEXT
Tagged: #parse #header #lambda
ADD COMMENT
Topic
Name
1+3 =