... open(method,url) :初始化Ajax对象(设置请求类型与请求地址) setRequestHeader(header,value) :设置请求头 header:请求头 ...
基于1个网页-相关网页
它构建 URI,设置请求头,并在一行代码中调用请求。
It builds the URI, sets the request headers, and invokes the request in one line of code.
如果你重写了该方法,你可以避免计算请求体,直接设置请求头以提高性能。
If you override this method, you can avoid computing the response body and just set the response headers directly to improve performance.
被接受或返回的资源表示将依赖于客户机设置的HTTP请求头。
The resource representation that is accepted or returned will depend on HTTP request headers set by the client.
应用推荐