WIndows Phone: POST request doesn't work
i'm tryng to send the notification link and deviceID to a script on the
web via a POST request. the problem is that the script receive only empty
params. i followed another example and my code looks like this:
WebClient wc = new WebClient();
System.Diagnostics.Debug.WriteLine("sending rquest");
var URI = new
Uri("http://www.jack-prove.comuv.com/update_link.php");
wc.UploadStringCompleted += new
UploadStringCompletedEventHandler(wc_UploadStringCompleted);
byte[] myDeviceID =
(byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string ID = Convert.ToBase64String(myDeviceID);
String par = "?link=" + e.ChannelUri.ToString() + "&ID=" + ID;
MessageBox.Show(par);
wc.UploadStringAsync(URI, "POST", par);
NOTE: the ID string contains a '=' charater could this be the problem?
i've tried to call the script from the web and it works even with the '='
any idea?
No comments:
Post a Comment