From 7c8a610c57892eda0fbd0fee38c7cbb99d0d81b3 Mon Sep 17 00:00:00 2001 From: "Turner, Dan" Date: Mon, 15 Sep 2014 18:42:50 +1000 Subject: [PATCH 1/2] fix: Use the correct overload of TeamCityCaller where a return object is not needed Fixes #48 --- src/TeamCitySharp/ActionTypes/BuildConfigs.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TeamCitySharp/ActionTypes/BuildConfigs.cs b/src/TeamCitySharp/ActionTypes/BuildConfigs.cs index cdcd4a0f..cafd67e5 100644 --- a/src/TeamCitySharp/ActionTypes/BuildConfigs.cs +++ b/src/TeamCitySharp/ActionTypes/BuildConfigs.cs @@ -101,12 +101,12 @@ public void SetConfigurationPauseStatus(BuildTypeLocator locator, bool isPaused) public void PostRawArtifactDependency(BuildTypeLocator locator, string rawXml) { - _caller.PostFormat(rawXml, HttpContentTypes.ApplicationXml, string.Empty, "/app/rest/buildTypes/{0}/artifact-dependencies", locator); + _caller.PostFormat(rawXml, HttpContentTypes.ApplicationXml, "/app/rest/buildTypes/{0}/artifact-dependencies", locator); } public void PostRawBuildStep(BuildTypeLocator locator, string rawXml) { - _caller.PostFormat(rawXml, HttpContentTypes.ApplicationXml, string.Empty, "/app/rest/buildTypes/{0}/steps", locator); + _caller.PostFormat(rawXml, HttpContentTypes.ApplicationXml, "/app/rest/buildTypes/{0}/steps", locator); } public void PostRawBuildTrigger(BuildTypeLocator locator, string rawXml) From 40f25713b96ad8a4cf09f4e8f306132d7bacb174 Mon Sep 17 00:00:00 2001 From: "Turner, Dan" Date: Mon, 15 Sep 2014 18:43:50 +1000 Subject: [PATCH 2/2] fix: Specify a content-type where a a return object is expected Fixes #48 --- src/TeamCitySharp/ActionTypes/VcsRoots.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TeamCitySharp/ActionTypes/VcsRoots.cs b/src/TeamCitySharp/ActionTypes/VcsRoots.cs index 9e1e95a9..b418e053 100644 --- a/src/TeamCitySharp/ActionTypes/VcsRoots.cs +++ b/src/TeamCitySharp/ActionTypes/VcsRoots.cs @@ -33,7 +33,7 @@ public VcsRoot ById(string vcsRootId) public VcsRoot AttachVcsRoot(BuildTypeLocator locator, VcsRoot vcsRoot) { var xml = string.Format(@"", vcsRoot.Id); - return _caller.PostFormat(xml, HttpContentTypes.ApplicationXml, string.Empty, "/app/rest/buildTypes/{0}/vcs-root-entries", locator); + return _caller.PostFormat(xml, HttpContentTypes.ApplicationXml, HttpContentTypes.ApplicationXml, "/app/rest/buildTypes/{0}/vcs-root-entries", locator); } public void DetachVcsRoot(BuildTypeLocator locator, string vcsRootId)