本文共 969 字,大约阅读时间需要 3 分钟。
直接上干货
Private Function POST(ByVal URL$, ByVal data$) Dim http On Error Resume Next http = CreateObject("WinHttp.WinHttpRequest.5.1") With http .Open("POST", URL, True) .setRequestHeader("Accept-Language", "zh-CN") .setRequestHeader("Cache-Control", "no-cache") .setRequestHeader("User-Agent", "Mozilla/4.0") .setRequestHeader("Connection", "Keep-Alive") .setRequestHeader("Content-Length", data.Length) .setRequestHeader("Content-Type", "application/x-www-form-urlencoded") .Send(data) .WaitForResponse() POST = .getallresponseheaders Dim request = http.responseText End With http = Nothing End Function