我翻译的ServerXMLHttp中文手册(6)

来源:互联网 发布:相机内存卡数据恢复 编辑:程序博客网 时间:2024/05/17 08:01

本手册完整下载地址:http://download.csdn.net/source/1977669

status 属性

表示当前请求所返回的http状态码。

语法
plStatus = oServerXmlhttp.status
示例
dim oServerXmlhttp,lValueset oServerXmlhttp = server.createObject("Msxml2.ServerXMLHTTP.3.0")oServerXmlhttp.open "GET", "http://localhost/book.htm", False, "", "" oServerXmlhttp.send()lValue = oServerXmlhttp.statusif lValue = 404 then response.write "Page No Found!"end ifset oServerXmlhttp = nothing
参数

plStatus [out,retval]

一个返回的状态码,它是一个长整型数。

返回值

这个长整型数状态值是一个标准HTTP状态码,如下表所详述:

数字 说明 100Continue101Switching protocols200OK201Created202Accepted203Non-Authoritative Information204No Content205Reset Content206Partial Content300Multiple Choices301Moved Permanently302Found303See Other304Not Modified305Use Proxy307Temporary Redirect400Bad Request401Unauthorized402Payment Required403Forbidden数字说明404Not Found405Method Not Allowed406Not Acceptable407Proxy Authentication Required408Request Timeout409Conflict410Gone411Length Required412Precondition Failed413Request Entity Too Large414Request-URI Too Long415Unsupported Media Type416Requested Range Not Suitable417Expectation Failed500Internal Server Error501Not Implemented502Bad Gateway503Service Unavailable504Gateway Timeout505HTTP Version Not Supported
备注

这个方法的结果只有在send方法已经成功完成之后才可用。

statusText属性|ServerXMLHTTP中文手册

statusText 属性

表示Http应答行状态。

语法
pbstrStatus = oServerXmlhttp.statusText
示例
dim oServerXmlhttp,strValueset oServerXmlhttp = server.createObject("Msxml2.ServerXMLHTTP.3.0")oServerXmlhttp.open "GET", "http://localhost/book.htm", False, "", "" oServerXmlhttp.send()strValue = oServerXmlhttp.statusTextset oServerXmlhttp = nothing
参数
pbstrStatus [out,retval]

这个HTTP应答是一个"BSTR"值。

备注

这个方法的结果只有在send方法已经成功完成之后才可用。