Closed lopezjurip closed 7 years ago
Using a event.json
like:
{
"resource": "/users",
"path": "/users",
"httpMethod": "GET",
"headers": {
"Accept": "*/*"
},
"queryStringParameters": null,
"pathParameters": null,
"stageVariables": null,
"body": null,
"isBase64Encoded": false
}
and running:
serverless invoke local --function handler --log --path event.json
Works well
This would be by design I think - I'm open to suggestions on how you would like this to work; this is sort of a problem with serverless invoke, which is why there is a discussion to make like serverless invoke http
because a regular lambda invoke and an API Gateway invoke are quite different
Would you accept that if event
is undefined, it defaults to:
{
"method": "GET",
"path": "/",
"body": ""
}
?
Looks like a razonable default 👍
Released v1.1.0 with this in it
Can't be run locally, perhaps
event
is empty