似乎您将strJson放在查询字符串中,这意味着应该对它进行urlencode编码。但是我不建议这样做。最好使用winHTTP的RequestBody参数进行发布,而不是尝试将其全部放入一个字符串中。和发布。
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
'list
'~~> Indicates that page that will receive the request and the type of request being
submitted
xmlhttp.Open "POST","https://www.example.com/api/go/XSx/rest/inquiry/resolveXInquiry",False
'~~> Indicate that the body of the request contains form data
xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
''or JSON content type
'~~> Send the data as name/value pairs
'["50061555","50055854","500615516","500615576","50055910"]
xmlhttp.send "request={""inquiryIds"":[50061333],""requestType"":""Report2"",""from"":""*parameter"",""comment"":""report""}"
,
非常感谢!
那是我想念的想法!
strJSON必须作为正文(XMLHttpRequest.send(正文))发送。
本文链接:https://www.f2er.com/2764538.html