什么是HTTP实体? [英] What exactly is an HTTP Entity?

查看:907
本文介绍了什么是HTTP实体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人请向我描述一下 HTTP实体究竟是什么?

Would someone please describe to me what exactly an HTTP entity is?

我正在阅读HTTPClient文档,但我不是真的明白这意味着什么?

I am reading the HTTPClient documentation, but I do not really understand what that means?

推荐答案

HTTP实体是HTTP请求或响应的主要部分,由某些标题和正文(如果存在)。它似乎是没有请求或状态行的整个请求或响应(尽管只有某些标题字段被视为实体的一部分)。

An HTTP entity is the majority of an HTTP request or response, consisting of some of the headers and the body, if present. It seems to be the entire request or response without the request or status line (although only certain header fields are considered part of the entity).

为了说明;这是一个请求:

To illustrate; here's a request:

POST /foo HTTP/1.1          # Not part of the entity.
Content-Type: text/plain    # ┬ The entity is from this line down...
Content-Length: 1234        # │
                            # │
Hello, World! ...           # ┘

并回复:

HTTP/1.1 200 OK             # Not part of the entity.
Content-Length: 438         # ┬ The entity is from this line down...
Content-Type: text/plain    # │
                            # │
Response body ...           # ┘

这篇关于什么是HTTP实体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆