Urgent: Swoole\Http\Client vs Swoole\Coroutine\HTTP\Client #4887
-
Question-1: Why description of "Swoole\Http\Client" is not available on official documentation for OpensWoole ? (official documentation describes only Coroutine version "Swoole\Coroutine\HTTP\Client"). Question-2: The get() function on Swoole\Http\Client takes two parameters the second of which is a callback / anonymous function, but this second parameter is not available on coroutine version of get(), why ? Question-3: The link https://openswoole.com/docs/modules/swoole-coroutine-http-client-get recieves body data using $client->body which dows not work and which is not available in official documentation, instead getBody() works and is available on Official Documentation. May be you need to update example on the link above. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
As I understand openswoole is a fork , and looks like not supported a lot, so openswoole documentation may be not relevant for swoole project, correct me pls if I wrong |
Beta Was this translation helpful? Give feedback.
-
@fakharksa Hi. I think you are confusing the github repo between the swoole and openswoole, here is swoole github repo. Swoole developers are still actively maintaining swoole, you can see the prs https://github.com/swoole/swoole-src/pulls , commits https://github.com/swoole/swoole-src/commits/master and releases https://github.com/swoole/swoole-src/releases Swoole also has grpc too https://github.com/swoole/grpc matyhtf is the key and active contributor to swoole rather than openswoole. |
Beta Was this translation helpful? Give feedback.
@fakharksa Hi.
Swoole\Http\Client is only available in the old version and it was renamed to Swoole\Coroutine\HTTP\Client in later versions.
Some functions of Swoole\Http\Client were changed in later versions.
I think you are confusing the github repo between the swoole and openswoole, here is swoole github repo.
Swoole and openswoole are different repo and the detailed documentation available for Swoole is https://www.swoole.com.
Swoole developers are still actively maintaining swoole, you can see the prs https://github.com/swoole/swoole-src/pulls , commits https://github.com/swoole/swoole-src/commits/master and releases https://github.com/swoole/swoole-src/releases
Swoole also has grpc …