它构建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.
步骤(2)设置HTTP请求头,并准备在步骤(3)中通过流发送的负载。
Step (2) sets the HTTP request headers and prepares the payload to be sent in step (3) over the stream to the service.
ACT似乎没有切换到HTTP 1.1的全局设置,所以测试无法发送这个请求头。
ACT doesn't appear to have a global setting to switch to HTTP 1.1 so the test will sends the additional header.
否则,我们设置ETag响应头以便为下一次客户端请求做好准备。
Otherwise, we set the ETag response header in preparation for the next client request.
请求使用POST而非GET打开,而且Content - type头被设置为让服务器预知它能得到何种数据。
The request is opened using POST instead of GET, and the Content-Type header is set to let the server know what sort of data it should expect.
如果你的内容经常改变,但是不是每次页面请求都改变,考虑设置一个Cache - Control: max -age头信息;大部分用户会在短时间内多次访问同一页面。
If your content changes often, but not on every page hit, consider setting a Cache-Control: max-age header; most users access pages again in a relatively short period of time.
另一面在于,与普通页面请求相反,门户不为响应提供任何缺省标头信息;所有信息都必须在资源服务过程中显式地进行设置。
The flip side is that, in contrast to normal page requests, the portal does not provide any default header information for the response; all information must be explicitly set during resource serving.
此外,要使资源请求可缓存,您需要在响应上显式设置缓存控制信息,以便门户能够生成缓存标头。
Also, to make a resource request cacheable, you need to explicitly set the cache control information on the response so that the portal can generate caching headers.
测试是否能够为请求设置指定的HTTP标头。
Tests whether the specified HTTP header can be set for the request.
是以下几种页面作者无法为XHR请求设置的标头字段。
Origin is one of several header fields that cannot be set for a XHR request by page authors.
是以下几种页面作者无法为XHR请求设置的标头字段。
Origin is one of several header fields that cannot be set for a XHR request by page authors.
应用推荐