推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
sdlearn
V2EX  ›  Python

python 发送数据问题求助

  •  
  •   sdlearn · Apr 11, 2014 · 4221 views
    This topic created in 4598 days ago, the information mentioned may be changed or developed.
    python 如何使用requests库发送如下数据:

    OPTIONS * HTTP/1.1
    Host: 1.2.3.4:443

    测试过程发现如果给80端口发,使用requests.options()可以,但是端口换成443就不行了,
    网上找了好久没找到答案,前来求教
    4 replies  •  1970-01-01 08:00:00 +08:00
    binux
    binux
    Apr 11, 2014❤️1
    2
    http://1.2.3.4:443/
    sdlearn
    sdlearn
    OP
    Apr 11, 2014
    3
    @pc10201 多谢,经测试r = requests.options('https://'+ipNew,timeout=5,verify=False)可以。
    但是有没有办法去掉前面的https://,直接在ip后面接上端口来访问呢
    ushuz
    ushuz
    Apr 12, 2014 via iPhone
    4
    @sdlearn 地址必须加scheme,可以试试2楼的建议。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1032 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:01 · PVG 03:01 · LAX 11:01 · JFK 14:01
    ♥ Do have faith in what you're doing.