摘要:
此示例已实现查看网页的代码来理解HTTP基本协议:(返回的是百度首页的网页代码) 1 import java.io.BufferedReader; 2 import java.io.IOException; 3 import java.io.InputStreamReader; 4 import java.io.OutputStream; 5 import java.io.OutputStreamWriter; 6 import java.io.PrintWriter; 7 import java.net.Socket; 8 9 10 public class HttpTest {11 12. 阅读全文