Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法用请求的文档和来自 http.Server 请求回调的 JSON 对象来响应单个 GET 请求?
如果您想Content-Type从同一页面提供两个不同的 HTTP ,由于协议的限制,这是不可能的。但是,您可以在页面上创建另一个 iFrame,让主框架为一种类型提供服务,而 iFrame 为另一种提供服务。
Content-Type
如果您想在单个响应中使用两种不同的类型,我认为多部分 MIME响应是您最好的选择。