protected internal TSource Deserialize(IRestResponse response) { return(response?.ContentType.ToLower(CultureInfo.CurrentCulture) switch { "xml" => ParseResponse(NodeUtils.CreateXmlDocumentFromText(response.Content)), "json" => ParseResponse(JObject.Parse(response.Content)), "text/plain" => ParseResponse(response.Content), "text/html" => ParseResponse(NodeUtils.CreateHtmlDocumentFromText(response.Content)), _ => throw new NotImplementedException( $"{CallerClass} response type could not be determined.") });