CONNECT - HTTP 编辑
The HTTP CONNECT
method starts two-way communications with the requested resource. It can be used to open a tunnel.
For example, the CONNECT
method can be used to access websites that use SSL (HTTPS). The client asks an HTTP Proxy server to tunnel the TCP connection to the desired destination. The server then proceeds to make the connection on behalf of the client. Once the connection has been established by the server, the Proxy server continues to proxy the TCP stream to and from the client.
CONNECT
is a hop-by-hop method.
Request has body | No |
---|---|
Successful response has body | Yes |
Safe | No |
Idempotent | No |
Cacheable | No |
Allowed in HTML forms | No |
Syntax
CONNECT www.example.com:443 HTTP/1.1
Example
Some proxy servers might need authority to create a tunnel. See also the Proxy-Authorization
header.
CONNECT server.example.com:80 HTTP/1.1 Host: server.example.com:80 Proxy-Authorization: basic aGVsbG86d29ybGQ=
Specifications
Specification | Title |
---|---|
RFC 7231, section 4.3.6: CONNECT | Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |
Browser compatibility
BCD tables only load in the browser
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论