I'm talking about POST requests, using:
WebClient wc = new WebClient(); String result = wc.UploadString("http://example.com/", "data=hello, world!"); Edit: This is my actual code right now:
String result; using (WebClient wc = new WebClient()) { result = wc.UploadString("http://" + "pastebin.com/api_public.php", "POST", "paste_code=" + LongDataEscape(Clipboard.GetText())); } And if you're wondering about LongDataEscape:
public String LongDataEscape(String Str) { String Output = ""; int ByteCount = 32766; if (Str.Length > ByteCount) { for (int i = 0; i < Str.Length; i+= ByteCount) { if (Str.Length - i < ByteCount) Output += Uri.EscapeDataString(Str.Substring(i, Str.Length - i)); else Output += Uri.EscapeDataString(Str.Substring(i, ByteCount)); } } else Output = Uri.EscapeDataString(Str); return Output; } The first time I execute the above piece of code it always takes around 15 seconds (ok maybe 10), no matter what website it is to, but the same code pieces that follow are just instantly.
I was thinking there might be some setting that does it, but I haven't found out yet.