📜  vba http 请求 json - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.197000             🧑  作者: Mango

代码示例1
'https://github.com/VBA-tools/VBA-Web. 
'Using this library, it would look like:

Sub sendPostRequest()
  Dim Body As New Dictionary
  Dim Client As New WebClient
  Dim Response As WebResponse

  Body.Add "mType", "OPEN_SYSTEM_TRADE"
  Body.Add "systemOwnerId", 10
  'Equal to Body = "{""mType"":""OPEN_SYSTEM_TRADE"",""systemOwnerId"":10}"

  Set Response = Client.PostJson("somewebsite.com", Body)

  Worksheets("Sheet1").Range("A1").Value = Response.Content
End Sub