当前位置: 首页>>代码示例>>Python>>正文


Python HttpCall.callHttpPOST方法代码示例

本文整理汇总了Python中HttpCall.callHttpPOST方法的典型用法代码示例。如果您正苦于以下问题:Python HttpCall.callHttpPOST方法的具体用法?Python HttpCall.callHttpPOST怎么用?Python HttpCall.callHttpPOST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HttpCall的用法示例。


在下文中一共展示了HttpCall.callHttpPOST方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: loadTemplate

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def loadTemplate(case, name="", uid="", trace=0):
    contextExtension = ""
    if (uid!=""):
        contextExtension=uid
    if (name!=""):
        contextExtension="name/"+name
    if trace:
        print case
        print name
        print uid
    response = HttpCall.callHttpPOST(server, "objectology/template/"+contextExtension, {"data":case}).strip()
    return response
开发者ID:revolutionarysystems,项目名称:common-test,代码行数:14,代码来源:o_utils.py

示例2: createSubscription

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def createSubscription(customerId):
    service = "/customers/"+customerId+"/subscriptions"
    params = {
                "plan":"eCKB-t",
             }
    res = HttpCall.callHttpPOST(uri, service, params, contentType=None, username="sk_test_4qo3vbZaV6CI9l3ITyox2St3")
    res2 = res.replace("\r", "")
    null=None
    false=0
    true=1
    dict = eval(res2)
    return dict["id"]
开发者ID:revolutionarysystems,项目名称:o-test,代码行数:14,代码来源:testStripe.py

示例3: createCustomer

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def createCustomer():
    service = "/customers"
    params = {
                "card":getCardToken(),
                "description":"test example for revsys",
             }
    res = HttpCall.callHttpPOST(uri, service, params, contentType=None, username="sk_test_4qo3vbZaV6CI9l3ITyox2St3")
    res2 = res.replace("\r", "")
    null=None
    false=0
    true=1
    dict = eval(res2)
    return dict["id"]
开发者ID:revolutionarysystems,项目名称:o-test,代码行数:15,代码来源:testStripe.py

示例4: getCardToken

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def getCardToken():
    service = "/tokens"
    params = {
                "card[number]":"4242424242424242",
                "card[exp_month]":"12",
                "card[exp_year]":"2015",
                "card[cvc]":"123",
             }
    res = HttpCall.callHttpPOST(uri, service, params, contentType=None, username="sk_test_4qo3vbZaV6CI9l3ITyox2St3")
    res2 = res.replace("\r", "")
    null=None
    false=0
    true=1
    cardDict = eval(res2)
    return cardDict["id"]
开发者ID:revolutionarysystems,项目名称:o-test,代码行数:17,代码来源:testStripe.py

示例5: makeQuery

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def makeQuery(instanceType, case):
    response = HttpCall.callHttpPOST(server, "objectology/"+instanceType+"/query", {"data":case}, contentType="application/json").strip()
    null = None
    instances = eval(response)
    return instances
开发者ID:revolutionarysystems,项目名称:common-test,代码行数:7,代码来源:o_utils.py

示例6: applyDelta

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def applyDelta(instanceTypeAndId, case, contentType="text/xml"):
    response = HttpCall.callHttpPOST(server, "objectology/"+instanceTypeAndId+"/", {"data":case}, contentType=contentType).strip()
    return response
开发者ID:revolutionarysystems,项目名称:common-test,代码行数:5,代码来源:o_utils.py

示例7: createInstance

# 需要导入模块: import HttpCall [as 别名]
# 或者: from HttpCall import callHttpPOST [as 别名]
def createInstance(instanceType, case, contentType="text/xml"):
    response = HttpCall.callHttpPOST(server, "objectology/"+instanceType+"/", {"data":case}, contentType=contentType).strip()
    return response
开发者ID:revolutionarysystems,项目名称:common-test,代码行数:5,代码来源:o_utils.py


注:本文中的HttpCall.callHttpPOST方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。