diff --git a/src/TeamCitySharp/Connection/TeamCityCaller.cs b/src/TeamCitySharp/Connection/TeamCityCaller.cs index 35879822..8f2cbadf 100644 --- a/src/TeamCitySharp/Connection/TeamCityCaller.cs +++ b/src/TeamCitySharp/Connection/TeamCityCaller.cs @@ -67,6 +67,7 @@ public void GetDownloadFormat(Action downloadHandler, string urlPart, pa throw new ArgumentException("If you are not acting as a guest you must supply userName and password"); } + urlPart = System.Web.HttpUtility.UrlEncode(urlPart); if (string.IsNullOrEmpty(urlPart)) { throw new ArgumentException("Url must be specfied"); @@ -289,4 +290,4 @@ private string GetContentType(string data) return HttpContentTypes.TextPlain; } } -} \ No newline at end of file +}