Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Victor-OFC opened this issue Jul 17, 2024 · 0 comments

Comments

@Victor-OFC
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant