Introduce serialzeBodyToJson
property on HTTP event files
#7836
Labels
stage/needs-feedback
Needs feedback from the community (are you also interested in/experiencing this?)
type/feature
Feature request
Describe your idea/feature/enhancement
Normally, when configuring an FunctionUrl for a Lambda function, you would invoke it like below.
sam local invoke SomeFunction --event some-event.json
Where the event file includes a HTTP payload, containing a raw JSON string for the body.
When the application grows, I would like the application be easier to test locally. Including JSON objects in the body to send data, with a flag to turn this off or on would therefor be valueable.
Proposal
Introduce an optional
serialzeBodyToJson
property on the object and default it tofalse
. Whentrue
, it will directly send the body to the lambda function as a dictionary.The text was updated successfully, but these errors were encountered: