gpt4 book ai didi

android - 从 android 客户端发送套接字请求到 sails.js 0.11

转载 作者:太空狗 更新时间:2023-10-29 16:35:59 26 4
gpt4 key购买 nike

知道如何在 android 中发出 socket.get() 请求吗?

我试试这个:

JSONObject obj = new JSONObject();
obj.put("url","/controller/action");
socketClient.emit("get",obj);

服务器响应是:

Error (SAILS:HOOK:SOCKETS:PARSE_VIRTUAL_REQ):: Failed to parse incoming socket.io request
...
details: 'Sails v0.11.x is not compatible with the socket.io/sails.io.js client SDK version you are using (0.9.0). Please see the v0.11 migration guide on http://sailsjs.org for more information.'

最佳答案

只需将您的网址更改为如下所示

http://xxx.xxx.xxx.xxx:1234/?__sails_io_sdk_version=0.11.0

关于android - 从 android 客户端发送套接字请求到 sails.js 0.11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28733014/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com