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 access POST parameters? #14

Open
cades opened this issue Jan 16, 2015 · 3 comments
Open

How to access POST parameters? #14

cades opened this issue Jan 16, 2015 · 3 comments

Comments

@cades
Copy link

cades commented Jan 16, 2015

Hi everybody, thanks for building this cool stuff.

I can not figure a way to access POST parameters (form-data, or x-www-form-urlencoded), do you know how to?

@Stuk
Copy link
Contributor

Stuk commented Feb 8, 2015

There's nothing built in to do this, but you can call response.body.read(), which returns a promise for the full body. You can then use querystring.parse on that to get the post parameters.

Sorry it isn't more straightforward.

@cades
Copy link
Author

cades commented Feb 9, 2015

Thanks for response! Maybe we can write a middleware for this job.

@kriskowal
Copy link
Member

You can definitely write an adapter for this job and I would definitely accept it in Q-IO’s http-apps, provided that it was careful about verifying the content type. An adapter for multipart would be good too. Ideally this would be transparent, but that might not be feasible.

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

3 participants