检索活动从getTream.io api返回未定义的错误



我遵循getTream的文档步骤,一切顺利,直到"检索活动"步骤。


运行

import stream from 'getstream' // stream-js v3.5.0
const client = stream.connect(APP_KEY, null, APP_ID, { location: 'eu-west' });
const user1 = client.feed('user', '1', READ_ONLY_TOKEN);
user1.get({ limit:5, offset:5 })
  .catch((errorData) => {
    console.log(errorData);
  });

给我

{
    error: undefined,
    response: {
        statusCode: 0,
        request: {
            uri: {
                protocol: "https:",
                slashes: true,
                auth: null,
                host: "api.getstream.io",
                port: null,
                hostname: "api.getstream.io",
                hash: null,
                search: "?limit=5&offset=5&api_key=...secret...&location=unspecified",
                query: "limit=5&offset=5&api_key=...secret...&location=unspecified",
                pathname: "/api/v1.0/feed/global/global/",
                path: "/api/v1.0/feed/global/global/?limit=5&offset=5&api_key=...secret...&location=unspecified",
                href: "https://api.getstream.io/api/v1.0/feed/global/global/?limit=5&offset=5&api_key=...secret...&location=unspecified"
            },
            method: "GET",
            headers: {
                stream - auth - type: "jwt",
                Authorization: "...secret...",
                ["X-Stream-Client"]: "stream-javascript-client-browser-unknown",
                accept: "application/json"
            }
        }
    }
}

关于我可以在这里尝试什么的任何建议?

这是一个错误,在getTream/stream-js#99上描述,该错误刚刚由getTream.io team修复。

@jeltef:

我发现了这个问题。流星有自己的浏览器后备 请求lib对withCredentials有不同的默认值。这 覆盖我之前提到的请求浏览器库。PR#100 应该通过明确设置这一点来解决此问题。

...

我将其合并到主机中,您可以从那里开始使用安装直到发布。

谢谢大家的辛勤工作!

最新更新