admin管理员组

文章数量:1431586

I need to access the response header from a javascript websocket connection. Is there any way to access these response header? Or at least the response code?

I only have access to the event of onclose, onerror, onopen with a few (unusable - for my purposes) properties!

I need to access the response header from a javascript websocket connection. Is there any way to access these response header? Or at least the response code?

I only have access to the event of onclose, onerror, onopen with a few (unusable - for my purposes) properties!

Share Improve this question edited Jun 28, 2014 at 20:19 Sam 7,39816 gold badges48 silver badges68 bronze badges asked Apr 11, 2014 at 11:56 Loxone ThomasLoxone Thomas 1432 silver badges6 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

You can't. There is no functionality for that at the moment. The point of WebSockets is not HTTP munication. HTTP is only used for the handshake.

https://developer.mozilla/en-US/docs/Web/API/WebSocket

本文标签: How to access Websocket Response Headers in JavascriptStack Overflow