Created
May 3, 2012 21:12
-
-
Save clemensv/2589551 to your computer and use it in GitHub Desktop.
I actually wasn't kidding about entityless HTTP calls
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
var wr = WebRequest.Create("http://localhost:39472/Provisioning.svc/setup"); | |
wr.Method = "POST"; | |
wr.Headers.Add("P-DeviceId", this.deviceId); | |
using (var wq = (HttpWebResponse)wr.GetResponse()) | |
{ | |
if (wq.StatusCode == HttpStatusCode.OK) | |
{ | |
settings.DeviceAccount = wq.Headers["P-DeviceAccount"]; | |
settings.DeviceKey = wq.Headers["P-DeviceKey"]; | |
settings.DeviceSubscriptionUri = new Uri(wq.Headers["P-DeviceSubscriptionUri"]); | |
settings.EventSubmissionUri = new Uri(wq.Headers["P-EventSubmissionUri"]); | |
[...] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment