我需要从一个 HTML 页面向我的 REST 服务器发送以下 HTTP 请求以检索另一个页面。如何使用 javascript 或表单或链接或其他方式做到这一点?
请注意,HTTP 请求正文必须像表单通常那样包含没有键/值对的纯文本。
PUT /somerequest HTTP/1.1
Host: www.myhost.com
Accept: text/html,application/xhtml+xml
Payload of the request to be read by the server script.
The script will return a HTML content to my browser.
Thanks !
最佳答案
关于html - 从 HTML 页面提交 "pure"HTTP 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11161970/