python get post模拟请求
1.使用get方式时。url相似例如以下格式: [html] view plain copy index.jsp? id = 100 & op = bind GET报问头例如以下: [html] view plain copy GET /sn/index.php? sn = 123 & n = asa HTTP/1.1 Accept: */* Accept-Language: zh-cn host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: 12 Connection:close 2.使用post方式时。POST方法将请求參数封装在HTTP请求数据中,以名称/值的形式出现,能够传输大量数据,可用来传送文件。 POST报文头例如以下: [html] view plain copy POST /sn/index.php HTTP/1.1 Accept: */* Accept-Language: zh-cn host: localhost Content-Type: application/x-www-form-urlencoded Content-Length: 12 Connection:close sn = 123 & n = asa 在http头后边有一空行