1,502
社区成员
发帖
与我相关
我的任务
分享
Set XMLObject = CreateObject("Microsoft.XMLHTTP") '创建对象
XMLObject.Open "GET", "http://www.sss.com/test.txt", False '指定用GET方式提交HTTP头
XMLObject.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded" '向HTTP头添加信息
SendStr=""
XMLObject.send SendStr '开始发送数据
HTML = XMLObject.responseText '取得返回的文本
Dim ReturnText As String, ReturnByte() As Byte
...
XMLObject.send SendStr '开始发送数据
ReturnByte = XMLObject.responseBody '读出字节流到ReturnByte这个字节数组中
ReturnText = StrConv(ReturnByte, vbUnicode) '将字节流转换为文本,这样支持中文了
...