/ Published in: Java
Http Requests
for any langauge really but i used em in java :P
for any langauge really but i used em in java :P
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
out.write("POST " + path +" "); //Post requires Content-length then the data to be URLEncoder.encode("data=value"); OR out.write("GET " + path + " "); //Get requires the full path to the form out.write("Host: " + domain + " "); out.write("Content-length: " + data.length() + " "); out.write("User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) "); out.write("Accept: "); out.write(" "); out.flush();