函数代码如下:
' HTTP 协议提交 JSON 请求(POST) function HttpPostJson(sURL As String, sJson As String) as String Object objHttp = CreateObject("Msxml2.XMLHTTP") if IsObject(objHttp) then objHttp.open("POST", sURL, false) objHttp.setRequestHeader("Content-Type", "application/json") objHttp.send(sJson) if objHttp.readyState = 4 then Dim sRet As String = objHttp.responseText ReleaseObject(objHttp) return sRet end if end if ReleaseObject(objHttp) return "" end function