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

Lambda event.body object from browser POST response is of different type #192

Closed
nicolasblanco opened this issue Feb 10, 2017 · 1 comment · May be fixed by Itchibon777/serverless-offline#57 or Itchibon777/serverless-offline#58

Comments

@nicolasblanco
Copy link

Hello,

When I console.log(event.body) and perform a POST request by submitting a classical HTML form from the browser through AWS API Gateway->Lambda I get something like a query string:

event.body = 'first_name=Blabla&last_name=OOOOO&email=oooo%40aaa.com'

when running the same function via serverless-offline plugin on my localhost I get:

event.body = '{"first_name":"Blabla","last_name":"OOOOO","email":"oooo@aaa.com"}'

which looks like a JSON string.

I used same Node.js version (4.3.2).

Why is there this difference?

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