mark icon indicating copy to clipboard operation
mark copied to clipboard

Accessing post request payload

Open carlok opened this issue 4 years ago • 2 comments

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.

carlok avatar Oct 08 '20 08:10 carlok

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

passwalls avatar Oct 08 '20 13:10 passwalls

Thank you @passwalls

carlok avatar Oct 08 '20 14:10 carlok