Guest User

Problème réponse WebClient

a guest
Mar 1st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. public void uploadImage()
  2. {
  3.             string api = "http://www.noelshack.com/api.php";
  4.             string fileName = "file.jpg";
  5.             WebClient wc = new WebClient();
  6.             byte[] responseArray = wc.UploadFile(api, fileName);
  7.             // Decode and display the response.
  8.             MessageBox.Show(System.Text.Encoding.ASCII.GetString(responseArray), responseArray.Length.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);               
  9. }
Advertisement
Add Comment
Please, Sign In to add comment