simple-swoole / simps

🚀 A simple, lightweight and high-performance PHP coroutine framework.
https://simps.io
Apache License 2.0
469 stars 48 forks source link

Getting request object using application/json content-type #10

Closed eleazargan closed 4 years ago

eleazargan commented 4 years ago

I cannot seem to find out how to get the request object. Only URI parameters are included in documentation. Would be great if this type of request object is added into the documentation as well.

sy-records commented 4 years ago

I'll add that later. That should do it. You try it.

$request->rawContent();
sy-records commented 4 years ago

You can read Swoole's documentation first.

https://www.swoole.co.uk/docs/modules/swoole-http-request

https://www.swoole.co.uk/docs/modules/swoole-http-response

sy-records commented 4 years ago

Added. https://github.com/simple-swoole/docs/commit/ad0768d8494153d47324507f912d236e38f14ca2

Is that what you need? @eleazargan image

eleazargan commented 4 years ago

Awesome man! Thanks!