当前位置:   article > 正文

Python socket实现post请求_python socket post

python socket post
# -*- coding: utf-8 -*-
import socket
import time


strPost = "POST /bgdadmin/servlet/studentLogin HTTP/1.1\r\n" \
          "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n" \
          "Referer: http://yjsgl.bjut.edu.cn/bgdadmin/servlet/studentMain\r\n" \
          "Accept-Language: zh-cn\r\n" \
          "Content-Type: application/x-www-form-urlencoded\r\n" \
          "Accept-Encoding: gzip, deflate\r\n" \
          "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n" \
          "Host: yjsgl.bjut.edu.cn\r\n" \
          "Content-Length: 47\r\n" \
          "Connection: Keep-Alive\r\n" \
          "Cache-Control: no-cache\r\n" \
          "Cookie: JSESSIONID=DgxvXnRhLdSn65nfkyXv4wGXr8xQWb
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/181196
推荐阅读
相关标签
  

闽ICP备14008679号