From d49349afa722da9d07b48a64415dcbcd8126afd9 Mon Sep 17 00:00:00 2001 From: Tomek Melissa Date: Wed, 25 Mar 2020 18:08:09 +0100 Subject: [PATCH] Fixed #106 --- Common/Common.csproj | 1 + Common/Helpers/HttpClientHelper.cs | 9 ++++++--- Version.cs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Common/Common.csproj b/Common/Common.csproj index 4c10477..5fd4a23 100644 --- a/Common/Common.csproj +++ b/Common/Common.csproj @@ -44,6 +44,7 @@ + diff --git a/Common/Helpers/HttpClientHelper.cs b/Common/Helpers/HttpClientHelper.cs index c82521c..166e876 100644 --- a/Common/Helpers/HttpClientHelper.cs +++ b/Common/Helpers/HttpClientHelper.cs @@ -14,6 +14,7 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Text; using System.Threading.Tasks; +using System.Web; namespace RecurringIntegrationsScheduler.Common.Helpers { @@ -186,23 +187,24 @@ addAuthorization: {addAuthorization}"); { var uploadSettings = _settings as UploadJobSettings; var enqueueUri = new UriBuilder(GetAosRequestUri(ConnectorApiActions.EnqueuePath + uploadSettings.ActivityId)); + var query = HttpUtility.ParseQueryString(enqueueUri.Query); if (!string.IsNullOrEmpty(legalEntity)) { - enqueueUri.Query = "company=" + legalEntity; + query["company"] = legalEntity; } else { if (!string.IsNullOrEmpty(uploadSettings.Company)) { - enqueueUri.Query = "company=" + uploadSettings.Company; + query["company"] = uploadSettings.Company; } } if (!uploadSettings.IsDataPackage)// Individual file { // entity name is required - enqueueUri.Query += "entity=" + uploadSettings.EntityName; + query["entity"] = uploadSettings.EntityName; } if (_settings.LogVerbose || Log.IsDebugEnabled) { @@ -216,6 +218,7 @@ Output: Generated Uri: {enqueueUri.Uri.AbsoluteUri} Generated query: {enqueueUri.Query}"); } + enqueueUri.Query = query.ToString(); return enqueueUri.Uri; } diff --git a/Version.cs b/Version.cs index 1164839..23c3a30 100644 --- a/Version.cs +++ b/Version.cs @@ -2,4 +2,4 @@ Licensed under the MIT License. */ using System.Reflection; -[assembly: AssemblyVersion("3.1.1.0")] \ No newline at end of file +[assembly: AssemblyVersion("3.1.2.0")] \ No newline at end of file