开发者

Creating a POST body in VBA

Does anyone know how to construct a POST DATA body in VBA? I'm trying to upload rather lengthy strings via a post call using the "Microsoft.XMLHTTP" objec开发者_如何学JAVAt. I'm not tied to using that object for making the HTTP request either.


How about

Dim XMLHttp As Object: Set XMLHttp = CreateObject("Microsoft.XMLHTTP")
XMLHttp.Open "POST", "http://www.lfkfklkf.com", False
XMLHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
XMLHttp.send "q=ploppy&x=cake"
Debug.print XMLHttp.responseText
Set XMLHttp = Nothing
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜