I'm developing WP8 application. I need to add data in the url by using the E-mail id and password. I am using webclient()
, but I don't know how to do it. Can anyone help me to complete the task?
Thanks in advance.
My URL format:
http://xx.xx.xxx.xxx/main/content/api/data/pagename?email=abcd@abcd.com&sig=abcd
This is my url structure. I need to add data for the user above. My Form Design:
![enter image description here][1]
When I click the log-in button I should verify the emailid and password from the above mentioned url structure.
The code below works for posting the data, but I need to know how to post the data by using email and password.
public T Post<T>(string servicePath, string result)
{
string serviceURL = REST_URI + servicePath;
Uri URI = new Uri(serviceURL);
System.Net.WebClient webClient = new WebClient();
webClient.Headers["ContentType"] = "application/json";
webClient.Headers["Accept"] = "application/json";
webClient.UploadStringCompleted += this.sendPostCompleted;
webClient.UploadStringAsync(URI, HTTP_POST, result);
return default(T);
}