string image = @"C:\.....\helloX2.pdf";<br /> byte[] ImageData = System.IO.File.ReadAllBytes(image);<br /> Uri _uri = new Uri(@"http://XXX.XXX.XX.X:8080/MyHTTPFileServer/helloX2.pdf");<br /> WebClient client = new WebClient();<br /> client.Credentials = CredentialCache.DefaultCredentials;<br /> byte[] responseArray = client.UploadData(_uri, "POST",ImageData);<br /> string x = Encoding.ASCII.GetString(responseArray);<br /> client.Dispose();
DownloadData and UploadFile methods are working.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)