Swift, Lambda, Status: 405 Method Not Allowed?

Watching https://developer.apple.com/wwdc20/10644 Using Swift on AWS Lambda with Xcode.

When I call http://127.0.0.1:7000/invoke I get Status: 405 Method Not Allowed? in the browser. And my breakpoint does not hit, no message in Xcode either. Did anyone get this to work?

Replies

Well silly me, it has to be a JSON payload with a POST request.

curl --header "Content-Type: application/json" --request POST
--data '{"name":"ABC","password":"123"}'
http://127.0.0.1:7000/invoke

I was trying this in Safari! 😬🤣