首页 > 解决方案 > 优先连接许可证

问题描述

所以在优先级rest-api的最后一个版本中,他们添加了一个叫做“应用程序许可证”的东西,他们说你需要发送标题:X-App-Id,X-App-Key。所以我试图把它放在标题中,但这并没有真正起作用。我知道这个公园不工作的方式是因为这是一个运行良好的应用程序的一部分,但我需要更新应用程序以便它可以工作。这是在 vb 字符串中以可行的方式添加标题。

    'geeting info
    myParameters &= "url=" & Trim(Config.URL)
    myParameters &= "&tabulaini=" & Trim(Config.TabulaINI)
    myParameters &= "&language=" & Trim(Config.Language)
    myParameters &= "&company=" & Trim(TheCompany)
    myParameters &= "&username=" & Trim(Config.UserName)
    myParameters &= "&password=" & Trim(Config.Password)
    myParameters &= "&form=" & Trim(TheForm)
    myParameters &= "&doc=" & Trim(TheDoc)
    myParameters &= "&folder=" & Replace(Replace(Trim(Config.InFolder), "\", "/"), " ", "%20")
    myParameters &= "&file=" & Replace(Trim(NetFile), " ", "%20")

    'web request to the api
    Dim s As HttpWebRequest
    Dim enc As UTF8Encoding
    Dim postdata As String
    Dim postdatabytes As Byte()
    s = HttpWebRequest.Create("http://localhost:9876")
    'add the connection information the header
    s.Headers.Add("X-App-Id", "id")
    s.Headers.Add("X-App-Key", "CODE")

标签: vb.netpriority-web-sdk

解决方案


appID 和 appKey 应该是配置对象中参数的一部分。

这是 [Web-SDK] ( https://prioritysoftware.github.io/api/global/#login )相应部分的链接。


推荐阅读