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

Accessing post request payload #4

Open
carlok opened this issue Oct 8, 2020 · 2 comments
Open

Accessing post request payload #4

carlok opened this issue Oct 8, 2020 · 2 comments

Comments

@carlok
Copy link

carlok commented Oct 8, 2020

Hi, thanks for your work.
I'm not a workerman user so my apologies for such a simple question.
In your post example, $requst returns a huge object: how to retrieve the body payload? I've already looked at workerman docs but it's not clear either.
I noticed mark is #1 in benchmark at the moment so I want to benchmark it with a slightly different json rest test (I'm pretty impressed in their test it overclasses go, which can be compiled).
Thanks.

@passwalls
Copy link
Owner

Hi carlok.
Use $request->post() or $request->rawBody() to accessing post request payload.

@carlok
Copy link
Author

carlok commented Oct 8, 2020

Thank you @passwalls

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

2 participants