Path: blob/main/files/en-us/web/http/methods/connect/index.md
6538 views
------{{HTTPSidebar}}
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 {{Glossary("SSL")}} ({{Glossary("HTTPS")}}). The client asks an HTTP {{Glossary("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 {{Glossary("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 | No |
| {{Glossary("Safe/HTTP", "Safe")}} | No |
| {{Glossary("Idempotent")}} | No |
| {{Glossary("Cacheable")}} | No |
| Allowed in HTML forms | No |
Syntax
Example
Some proxy servers might need authority to create a tunnel. See also the {{HTTPHeader("Proxy-Authorization")}} header.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{Glossary("Proxy server")}}
{{HTTPHeader("Proxy-Authorization")}}