I'm trying to access as key value from this simple Lambda
package main
import (
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"net/http"
)
func Draw(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
return events.APIGatewayProxyResponse{
StatusCode: http.StatusOK,
Body: "Draw API " + request.Body,
}, nil
}
func main() {
// https://www.alexedwards.net/blog/serverless-api-with-go-and-aws-lambda
lambda.Start(Draw)
}
And with a simple curl
curl -d "timestamp=11223344" https://xxxxxxx.execute-api.us-east-1.amazonaws.com/dev/api/draw
I get
Draw API timestamp=11223344
How can i get a Key / Value string or map with param name and value? Unfortunately i cannot use json as input
Thanks!