推荐学习书目
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 · 3943 views
    This topic created in 4441 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
    pc10201
        1
    pc10201  
       Apr 11, 2014   ❤️ 1
    binux
        2
    binux  
       Apr 11, 2014   ❤️ 1
    http://1.2.3.4:443/
    sdlearn
        3
    sdlearn  
    OP
       Apr 11, 2014
    @pc10201 多谢,经测试r = requests.options('https://'+ipNew,timeout=5,verify=False)可以。
    但是有没有办法去掉前面的https://,直接在ip后面接上端口来访问呢
    ushuz
        4
    ushuz  
       Apr 12, 2014 via iPhone
    @sdlearn 地址必须加scheme,可以试试2楼的建议。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2711 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:27 · PVG 23:27 · LAX 08:27 · JFK 11:27
    ♥ Do have faith in what you're doing.