-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
23 lines (19 loc) · 832 Bytes
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
http://www.dilek.me/java/aws/lambda/2016/05/05/AWS-Lambda-Java-Example/
http://www.dilek.me/gradle/aws/lambda/2016/05/04/AWS-Lambda-Project-with-Gradle/
POST - form data to JSON
https://forums.aws.amazon.com/message.jspa?messageID=675886
application/x-www-form-urlencoded
*****
## convert HTTP POST data to JSON for insertion directly into a Lambda function
## first we we set up our variable that holds the tokenised key value pairs
#set($httpPost = $input.path('$').split("&"))
## next we set up our loop inside the output structure
{
#foreach( $kvPair in $httpPost )
## now we tokenise each key value pair using "="
#set($kvTokenised = $kvPair.split("="))
## finally we output the JSON for this pair and add a "," if this isn't the last pair
"$kvTokenised[0]" : "$kvTokenised[1]"#if( $foreach.hasNext ),#end
#end
}
*****