Going back to Listing 14, after we create the XML document as a string, we set the response header for the content type and send the XML string back to requester.
返回到清单14,在将XML文档创建为字符串后,设置内容类型的响应头部并将XML字符串发送回给请求者。
If it does, I will set the response header Content-Encoding to gzip and wrapper the response output stream with a gzip output stream.
如果支持,我将把响应头Content -Encoding设置为gzip并用gzip输出流把响应输出流包装起来。
showRecord looks up a Photo and sets a content-type header before writing the photoData byte array directly to the HTTP response.
showRecord 会查询一个Photo,并在将photoData直接写入HTTP响应之前设置 content-type头信息。
The server has to respond to the request and figure out a response to populate the content-length response header, so you don't save any processing time.
服务器必须对请求进行响应,并构造一个响应来填充内容长度的响应头,因此并不能节省任何处理时间。
The header is used to pass control information, and the body contains the actual request or response message content.
头信息用于传送控制信息,主体包含实际请求或响应消息内容。
It then validates that it has proper type of JSON, and that the content-type response header is JSON.
然后验证是否有适当类型的JSON,并验证内容类型响应标头是否为JSON。
The server then returns the resource representation as the specified type (if it can), and populates the Content-Type header in the response with the actual media type delivered to the client.
然后该服务器返回资源表示形式作为指定的类型(如果可以),并用提供给客户端的实际媒体类型填充响应中的Content - Type标头。
Thus, you will get a response, which include the response header name "Content-Encoding" and value "gzip", and need to ungzip the response data.
这样,你将会得到一个响应,根据消息头Content-Encoding为gzip你可以知道,传输过来的数据是经过gzip压缩的。
Thus, you will get a response, which include the response header name "Content-Encoding" and value "gzip", and need to ungzip the response data.
这样,你将会得到一个响应,根据消息头Content-Encoding为gzip你可以知道,传输过来的数据是经过gzip压缩的。
应用推荐