private function onBeforeSend(RequestInterface $request, array &$options)
    {
        $base_uri = null;
        if (isset($options['base_uri']) && $options['base_uri']) {
            if ($options['base_uri'] instanceof UriInterface) {
                $base_uri = $options['base_uri'];
            }
        }

        $cookieJar = $this->getCookieJar($options, $base_uri);
        return $cookieJar->withCookieHeader($request);
    }