Update the url to call and use JSON Convert

This commit is contained in:
Kevin Giszewski
2017-09-06 19:53:25 -04:00
parent 1cb2139137
commit 6a7ac205bc
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -16,6 +16,6 @@
public const string CheckForUpdatesAlias = "Archetype:CheckForUpdates";
public const string IdAlias = "Archetype:Id";
public const string UmbracoVersionAlias = "umbracoConfigurationStatus";
public const string NotificationUrl = "https://api.gizmo42.com/v1/archetype/CheckForUpdates";
public const string NotificationUrl = "https://api.gizmo42.com/v1/archetype/check-for-updates";
}
}
@@ -202,12 +202,13 @@ namespace Archetype.Extensions
id = Guid.NewGuid().ToString();
}
var content = new StringContent(new
var content = new StringContent(JsonConvert.SerializeObject(new
{
umbracoVersion = ConfigurationManager.AppSettings[Constants.UmbracoVersionAlias],
archetypeVersion = DllVersion(),
id = id
}.ToString(), Encoding.UTF8, "application/json");
}), Encoding.UTF8, "application/json");
var response = client.PostAsync(new Uri(Constants.NotificationUrl), content).Result;