Join 4,000+ others and never miss out on new tips, tutorials, and more.
4.x is outdated, please check the latest version 22.x
pecl install openswoole-22.0.0
The built up FastCGI Client request object. This object is used to setup the request to send. It must be a
The default is to never time out (
-1) but you may set a timeout in seconds. So 1.5 means 1.5 seconds.
Swoole\\FastCGI\\HttpResponse object. You can catch any errors by using a try-catch with this client.
Execute the request to the FPM server and return the response.
Swoole\FastCGI\HttpResponse object contains the information from the FPM response.
The most commonly used request object is
Swoole\FastCGI\HttpRequest but you may also use
Swoole\FastCGI\Request which is used for when you are not sending a HTTP request. Refer to the documentation on the request and response objects for more details.
Any errors will thrown an
Swoole\Coroutine\FastCGI\Client\Exception, checkout the Dealing with errors section.
Checkout the main examples to see how this method is used and how to process a response.