Guest User

Untitled

a guest
Dec 26th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. string URI = "https://hhhh.domain/sms/url_send.html?originator=55555&";
  2. [DataMember]
  3. public string destination { get; set; }
  4. [DataMember]
  5. public string content { get; set; }
  6. string userPass = "password=fffff&username=bbbbbb";
  7.  
  8. public void sendParameters()
  9. {
  10. WebClient wc = new WebClient();
  11. NameValueCollection myCollection = new NameValueCollection();
  12. myCollection.Add("destination=", destination);
  13. myCollection.Add("&content=", content+ userPass);
  14.  
  15. byte[] responsebytes = wc.UploadValues(URI, "GET", myCollection);
  16. string responsebody = Encoding.UTF8.GetString(responsebytes);
  17.  
  18. }
  19.  
  20. {"An exception occurred during a WebClient request."}
Add Comment
Please, Sign In to add comment