Skip to content

How to actually invoke this? Everything results in 502: Missing field 'html' #46

Description

@Victor-OFC

Apologies if this is a dumb question, but I feel like I'm missing something crucial here that is not covered in the readme.

I have tried both deploying this via npm as well as with sam. Both ways result in a working lambda function that I have added a Function URL to, which I've made public just for testing. Using the sam invoke command in the readme works fine locally

Using curl, no matter what I've tried sending to it, I keep getting the same error:
Error: [BadRequest] Validation error: Missing field 'html'.","

I've been attempting to send requests like this:
curl -X POST "https://example.lambda-url.us-east-2.on.aws/" -H "Content-Type: application/json" -d '{ "html": "<html>example event</html>" }'

I've also tried manually creating and attaching an API Gateway to this function (I have no idea if this is necessary or not) and gotten the same results by using that URL.
What am I missing here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions