CONNECT
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
HTTP CONNECT
方法用於與請求的資源建立雙向通訊。它可用於打開隧道。
例如,CONNECT
方法可用於訪問使用 TLS(HTTPS)的網站。用戶端請求 HTTP 代理伺服器將 TCP 連接以隧道方式傳輸到所需目的地。然後代理伺服器代表用戶端建立連接。一旦連接建立,代理伺服器將繼續將 TCP 流從用戶端轉發到用戶端。
CONNECT
是一個跳躍式方法。
語法
http
CONNECT www.example.com:443 HTTP/1.1
範例
一些代理伺服器可能需要授權來建立隧道。另請參見 Proxy-Authorization
標頭。
http
CONNECT server.example.com:80 HTTP/1.1
Host: server.example.com:80
Proxy-Authorization: basic aGVsbG86d29ybGQ=
規範
Specification |
---|
HTTP Semantics # CONNECT |
瀏覽器相容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CONNECT |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.