vb.net - 优先连接许可证
问题描述
所以在优先级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")
解决方案
appID 和 appKey 应该是配置对象中参数的一部分。
这是 [Web-SDK] ( https://prioritysoftware.github.io/api/global/#login )相应部分的链接。
推荐阅读
- node.js - 猫鼬没有在生产现场连接
- php - 您的要求无法解决为一组可安装的软件包。PHP 7.4 泊坞窗
- php - Paypal 快递结帐未发回已发布的数据
- javascript - TypeError:无法读取 MongoStore.Store.createSession 中未定义的属性“过期”
- python - 与 Tensorflow 的自相关
- arrays - 在Angular中将一棵树展平为一个数组
- flutter - 如何在 TabBarView 中通过 MaterialPageRoute 导航?
- java - 我不知道在这些位置的 else 句中还能放什么
- excel - Power Query - 会计日历 445 本月周
- javascript - 使用 JS 分配渐变在动态生成的渐变上失败