我正在设计一个http服务器。我想将 http 消息正文编码为 JSON。 我知道 http 消息包含 header 和 http body。 我已经将所有内容编码为 JSON 格式。 http header 怎么样?我是否也必须将 http header 编码为 JSON?
最佳答案
Do I have to encode http header into JSON as well?
绝对不是。你不仅没有你,而且必须没有。 header 描述正文,并且必须遵循 the standard for HTTP headers ,与 JSON 无关。
关于json - 我必须将 http header 编码为 JSON 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19717571/