Công cụ Developer

WebSocket sang cURL

Chuyển đổi kết nối WebSocket thành lệnh handshake cURL, wscat, websocat, JavaScript hoặc Python

WebSocket connection
.sh
curl -i -N 'https://echo.websocket.org' \
  -H 'Connection: Upgrade' \
  -H 'Upgrade: websocket' \
  -H 'Origin: https://echo.websocket.org' \
  -H 'Sec-WebSocket-Version: 13' \
  -H 'Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==' \
  -H 'Authorization: Bearer YOUR_TOKEN'

The cURL output is the raw HTTP Upgrade handshake (RFC 6455). Use it to verify the server returns 101 Switching Protocols. cURL itself doesn't speak the WebSocket frame protocol after the handshake — for that, switch to wscat or websocat.

Chưa thấy công cụ bạn cần?

Chúng tôi xây công cụ miễn phí dựa trên phản hồi cộng đồng. Hãy đề xuất tiện ích giúp workflow của bạn!

WebSocket sang cURL — Công Cụ Miễn Phí Online | FreeTool24 | FreeTool24