Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共5 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]VB.net 代码是否能用?怎么用

1楼
fczhaobo 发表于:2024/1/3 19:06:00
Private Sub SurroundingSub()
    Dim client = New RestClient("/tool/open_api/api/goods/cat-detail?id=<id>")
    client.Timeout = -1
    Dim request = New RestRequest(Method.[GET])
    request.AddHeader("X-Signature", "{{signature}}")
    request.AddHeader("X-Timestamps", "{{timestamps}}")
    request.AddHeader("X-Nonce", "{{nonce}}")
    request.AddHeader("X-Apikey", "{{api_key}}")
    client.UserAgent = "Apifox/1.0.0 (https://apifox.com)"
    Dim response As IRestResponse = client.Execute(request)
    Console.WriteLine(response.Content)
End Sub
[此贴子已经被作者于2024/1/3 19:06:38编辑过]
2楼
fczhaobo 发表于:2024/1/4 14:07:00
请老师帮忙
3楼
有点蓝 发表于:2024/1/4 14:12:00
补齐命名空间,放到全局代码

public Sub SurroundingSub()
    Dim client = New xxx命名空间.RestClient("/tool/open_api/api/goods/cat-detail?id=<id>")
    client.Timeout = -1
    Dim request = New xxx命名空间.RestRequest(xxx命名空间.Method.[GET])
    request.AddHeader("X-Signature", "{{signature}}")
    request.AddHeader("X-Timestamps", "{{timestamps}}")
    request.AddHeader("X-Nonce", "{{nonce}}")
    request.AddHeader("X-Apikey", "{{api_key}}")
    client.UserAgent = "Apifox/1.0.0 (https://apifox.com)"
    Dim response As xxx命名空间.IRestResponse = client.Execute(request)
    output.show(response.Content)
End Sub

按钮事件直接调用即可
SurroundingSub()
4楼
fczhaobo 发表于:2024/1/4 21:21:00
老师,补齐命名空间,能详细的说一下吗?
5楼
有点蓝 发表于:2024/1/4 21:33:00
如果不懂什么是命名空间,网上搜搜。

至于1楼使用的什么命名空间,到抄代码的地方找。代码从哪来的去问那里
共5 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .04297 s, 2 queries.