1

我已经使用 Java 编写了一个简单的 HTTP 服务器,并希望向客户端(即常规浏览器)发送一些附加信息(拼图参数和一个小型拼图求解程序)。

同样,浏览器也应该将信息(解决方案)发送回服务器。

有没有办法通过仅通过 HTTP 标头传输此信息来做到这一点?

非常感谢

4

1 回答 1

3

the headers are usually used to add http protocol relevant information. You should probably use either the body of the response or cookies to add the needed information. Adding a cookie is done using the header so it kind of fits what you are asking for.

But I wonder why you need to put it in the header? it seems like what you are asking for is url parameters (client to server) and response body (server to client).

于 2012-07-21T21:44:49.000 回答