Closed JimLynchCodes closed 4 years ago
I was able to get the params like this:
type Response events.APIGatewayProxyResponse
// Handler is our lambda handler invoked by the `lambda.Start` function call
func Handler(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
fmt.Printf("request %+v", request)
fmt.Printf("request Body %+v", request.Body)
fmt.Printf("request HTTPMethod %+v", request.HTTPMethod)
fmt.Printf("request fancyHeader %+v", request.Headers["fancyHeader"])
fmt.Printf("request QueryStringParameters %+v", request.QueryStringParameters)
fmt.Printf("request PathParameters %+v", request.PathParameters)
...
Hi, I just scaffolded the "aws-go-dep" serverless project, but I'm wondering how to access route params and query params.
In the code I have access to the context and response objects:
But when I try to log the context it just looks like this:
If my url is
https://mycoolurl/ImaRouteParam?queryParam=foo
how can I access the route param and query param?
Thanks!