If you just need a file sent as the body of POST / STOR / etc, then WebClientit will simplify:
using (WebClient client = new WebClient())
{
client.UploadFile(address, fileName);
client.UploadFile(address, "PUT", fileName);
}
If you need a form, it's harder; you will need multipart-mime, which is not directly supported; You will have to write it or use existing code from the network.
source
share