public function createRetrievePactRequest($baseUrl, $consumerName, $providerName, $version, $tagName = null)
    {
        $url    = $baseUrl . '/pacts/provider/' . $providerName . '/consumer/' . $consumerName;
        $suffix = '';

        if ($version === 'latest') {
            $suffix .= '/latest';
        }else {
            $suffix .= '/versions/' . $version;
        }

        if ($tagName) {
            $suffix .= '/' . $tagName;
        }

        $url .= $suffix;

        $request = new Request('GET', $url, [
            "Content-Type" => "application/json"
        ]);

        return $request;
    }