src/Lambda/LambdaClient.php
public function getDefaultCurlOptionsMiddleware()
    {
        return Middleware::mapCommand(function (CommandInterface $cmd) {
            $defaultCurlOptions = [
                CURLOPT_TCP_KEEPALIVE => 1,
            ];
            if (!isset($cmd['@http']['curl'])) {
                $cmd['@http']['curl'] = $defaultCurlOptions;
            } else {
                $cmd['@http']['curl'] += $defaultCurlOptions;
            }
            return $cmd;
        });
    }
public function getDefaultCurlOptionsMiddleware()
    {
        return Middleware::mapCommand(function (CommandInterface $cmd) {
            $defaultCurlOptions = [
                CURLOPT_TCP_KEEPALIVE => 1,
            ];
            if (!isset($cmd['@http']['curl'])) {
                $cmd['@http']['curl'] = $defaultCurlOptions;
            } else {
                $cmd['@http']['curl'] += $defaultCurlOptions;
            }
            return $cmd;
        });
    }
public function getDefaultCurlOptionsMiddleware ( ) { return Middleware :: mapCommand ( function ( CommandInterface $ cmd ) { $ defaultCurlOptions = [ CURLOPT_TCP_KEEPALIVE => 1 , ] ; if ( ! isset ( $ cmd [ '@http' ] [ 'curl' ] ) ) { $ cmd [ '@http' ] [ 'curl' ] = $ defaultCurlOptions ; } else { $ cmd [ '@http' ] [ 'curl' ] += $ defaultCurlOptions ; } return $ cmd ; } ) ; }
Provides a middleware that sets default Curl options for the command

@return callable
Provides a middleware that sets default Curl options for the command