编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录

setRequestHeader

单独指定请求的某个http头

语法

oXMLHttpRequest.setRequestHeader(bstrHeader, bstrValue);

参数

bstrHeader
字符串,头名称。

bstrValue
字符串,值。

备注

如果已经存在已此名称命名的http头,则覆盖之。此方法必须在open方法后调用。

参考

getAllResponseHeaders 方法
XMLHTTPRequest 对象

相关文章
xmlhttprequest abort取消当前请求xmlhttprequest getresponseheader获取指定响应头xmlhttprequest onreadystatechange 响应状态改变方法xmlhttprequest open 打开创建请求xmlhttprequest responsexml 请求返回xmlxmlhttprequest setrequestheader 设置指定请求头xmlhttprequest readystate 请求状态xmlhttprequest send 发送请求mysql 指定程序选项php curlfile 设置 post 请求时使用的文件名php apache 函数 对指定的 uri 执行部分请求并返回所有有关信息php apache 函数 取得或设置 apache 请求记录php xml 解析器函数 为指定 xml 解析进行选项设置php imagick 为图片设置指定的格式php memcached 从指定的服务器上请求多个元素php oauth 为后续请求设置现时标志php oauth 设置目标请求引擎php oauthprovider 设置请求令牌路径php seaslog 设置可以由 seaslog 用于区分请求的 request iddocker指定网络模式 设置容器固定ip地址
AJAX教程 目录
 ajax介绍
   ajax是什么
   ajax的作用
   ajax使用方法
 ajax使用流程
   ajax创对象建XMLHttpRequest对象
   ajax发送请求send
   ajax回调responseText
   ajax响应状态readyState
 ajax案例
   ajax async异步请求和同步请求
   ajax兼容源代码
   ajax加载json案例
   ajax加载xml案例
 XmlHttp 参考手册
   XMLHTTPRequest 对象
   XMLHTTPRequest 成员
   onreadystatechange
   readyState
   responseBody
   responseStream
   responseText
   responseXML
   status
   statusText
   abort
   getAllResponseHeaders
   getResponseHeader
   open
   send
   setRequestHeader
关注编程学问公众号
编程学问网 湘ICP备20001732号