文章
体进 邓 · 九月 23 阅读大约需 1 分钟

HTTPS 客户端

1、使用HTTPS前,需要在系统 > 安全管理 > SSL/TLS 配置 添加客户端的凭据

2、代码

    Set httprequest=##class(%Net.HttpRequest).%New()
    set httprequest.SSLConfiguration="MySSLConfiguration"
    set httprequest.Https=1
    set httprequest.Server="things.icoldchain.cn"
    set httprequest.Port=443
    Do httprequest.InsertFormData("code","1520437297405")
    Do httprequest.InsertFormData("deviceSN","B7ZAU040")
    set tSc = httprequest.Post("/output/getDeviceProperties")
    s strRes=""
    do{
        s res=httprequest.HttpResponse.Data.ReadLine()
        s strRes=strRes_res
    }
    while(res'="")
    
    s strRes=$ZCONVERT(strRes,"I","JSON")
    quit strRes
    
    Quit httprequest.HttpResponse
1
0 32
讨论 (0)1
登录或注册以继续