【问题标题】:POST following request using python使用python发布以下请求
【发布时间】:2013-01-02 09:25:40
【问题描述】:

我是python新手

如何使用 python 发布以下内容,我需要登录 CISCO VNMC 并登录并从输出中获取 cookie,然后注销

 POST https://10.193.34.70/xmlIM/mgmt-controller

 Please enter content (application/x-www-form-urlencoded) to be POSTed:

 <aaaLogin 

    inName="admin" 

    inPassword="cisco@123"/>

http://www.cisco.com/en/US/docs/unified_computing/vnmc/sw/1.3/VNMC_API_Reference_Guide/VNMC_XML_API_2chap2.html#wp1162932

建议我这样做。

【问题讨论】:

    标签: python http-post


    【解决方案1】:

    http://docs.python.org/2/library/httplib.html

    您可以执行您的第一个请求,从响应中获取 cookie,以及您需要对这个模块执行的任何操作。

    【讨论】:

      【解决方案2】:

      使用最先进的 Python requests 模块

      http://docs.python-requests.org/en/latest/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-06-01
        • 1970-01-01
        • 1970-01-01
        • 2012-12-06
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多