public function createHttpClientForDevMode(HttpClientRecorder $recorder) : Client
    {
        $client = $this->createHttpClient(); // TODO: we need service decorators so we can avoid the hard call to createCache here

        /** @var HandlerStack $stack */
        $stack = $client->getConfig('handler');

        if ($stack instanceof HandlerStack) {
            $stack->unshift(new Middleware($recorder), 'profiler');
        }

        return $client;
    }
public function createHttpClientForDevMode(HttpClientRecorder $recorder) : Client
    {
        $client = $this->createHttpClient(); // TODO: we need service decorators so we can avoid the hard call to createCache here

        /** @var HandlerStack $stack */
        $stack = $client->getConfig('handler');

        if ($stack instanceof HandlerStack) {
            $stack->unshift(new Middleware($recorder), 'profiler');
        }

        return $client;
    }
@Di\Service("aviator.net.http-client", singleton=false)
@Di\Apply\IfConfig("env.devMode")

@param HttpClientRecorder $recorder

@return Client