Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static async Task<string> Connect(string email, string password, byte[] data)
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri + "user/connect?");
- request.Method = HttpMethod.Post;
- request.ContentType = "application/x-www-form-urlencoded";
- // Don't works because GetRequestStream() don't exists...
- //using (var writer = new StreamWriter(request.GetRequestStream()))
- //{
- // writer.Write("field=value");
- //}
- HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync();
- using (var sr = new StreamReader(response.GetResponseStream()))
- {
- // Debug.WriteLine(sr.ReadToEnd());
- return sr.ReadToEnd();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement