问题描述
我正在尝试使用默认的 karate.webSocket(url,handler)
;建立WSS连接;连接成功,但是将连接从 https
升级到 wss
时,所需的主机需要 Authorization:Bearer XXX
标头是否可以从 *.feature
文件中为WebSocket连接提供自定义HTTP标头?
I'm trying to make a WSS connection using default karate.webSocket(url, handler)
;Connection is successful, but desired host requires Authorization: Bearer XXX
header when upgrading connection from https
to wss
Is it possible to provide custom HTTP headers from *.feature
file for WebSocket connection?
推荐答案
实际上不,直到现在我们才意识到这是必需的.我们已经打开了一个问题: https://github.com/intuit/karate/issues/775-希望我们可以依靠您进行测试.
Actually no, we never realized this was needed until now. We've opened an issue: https://github.com/intuit/karate/issues/775 - hope we can count on you to test this.
这篇关于打开WebSocket连接时是否可以使用自定义标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!