-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: CadenceHost/Windows/MainWindow.xaml.cs
- Loading branch information
Showing
7 changed files
with
78 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ public static class Cadence | |
{ | ||
public static readonly String ServerUri = "http://cadence-bu.cloudapp.net/servers"; | ||
public static readonly String PulseUri = "http://cadence-bu.cloudapp.net/pulses"; | ||
|
||
public static readonly String ServerUriUpdate = "http://cadence-bu.cloudapp.net/servers/" + Properties.Settings.Default.ServerID; | ||
public static readonly String Username = "[email protected]"; | ||
public static readonly String Password = "Cadenc3!"; | ||
|
||
|
@@ -70,18 +70,21 @@ public static int SendPulse(NameValueCollection kvpData) | |
/// <param name="kvpData">The server data to update for the current server</param> | ||
public static void UpdateServer(NameValueCollection kvpData) | ||
{ | ||
PutRequest(kvpData); | ||
PutRequest(kvpData, ServerUriUpdate); | ||
} | ||
|
||
/// <summary> | ||
/// The base Put web request to send to the server | ||
/// </summary> | ||
/// <param name="kvpData">The data to send to the server</param> | ||
private static void PutRequest(NameValueCollection kvpData) | ||
/// <param name="serverUriUpdate"></param> | ||
private static void PutRequest(NameValueCollection kvpData, string serverUriUpdate) | ||
{ | ||
using (var wb = new WebClient()) | ||
var nc = new NetworkCredential("[email protected]", "Cadenc3!"); | ||
string responseJson; | ||
using (var wb = new WebClient { Credentials = nc }) | ||
{ | ||
var response = wb.UploadValues(ServerUri, "PUT", kvpData); | ||
var response = wb.UploadValues(serverUriUpdate, "PUT", kvpData); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters