-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小程序无法添加header #16
Comments
got it, it turns out a bug inside the code, some magic comes out! -------------------------------step 1---------------------------------- ---------------------------------step 2---------------------------------- |
How NewBee i am! |
@rzrobert weapp.socket.io not support polling transport |
@rzrobert @ccckblaze 关于 header 的使用,socket.io 官方文档有给出解释, 在 websokcet transport 模式下无法自定义 header,而且小程序版本的 socket.io 是不支持 polling transport 的。
|
const sendHeader = {
"pt": "weixin",
"sv": "18",
"lg": "zh-CN"
};
onSocket = io.connect(server, {
path: "/" + path,
transports: ['polling'],
transportOptions: {
polling: {
extraHeaders: sendHeader
}
}
});
The text was updated successfully, but these errors were encountered: