Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. string url = @"http://abhinavevent2014.sched.org/api/auth/login?api_key=1309658400d57c8cfc6081f8361de52c&username=abhinavm@test.com&password=test";
  2.  
  3.  
  4. Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
  5. WebRequest requestfriend = WebRequest.Create(url);
  6. WebResponse responsefriend = requestfriend.GetResponse(); ( This is where it blows)
  7. Stream streamResponse = responsefriend.GetResponseStream();
  8. StreamReader streamReaderResponse = new StreamReader(streamResponse, encode);
  9. jsonResult = streamReaderResponse.ReadToEnd();
  10.  
  11. return jsonResult.ToString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement