javascript - Retrieving Activities returns undefined error from getstream.io API -
i following documentation steps of getstream , went until "retrieving activities" step.
running
import stream '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); });
gives me
{ 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" } } } }
any suggestion of try here?
it bug, described @ getstream/stream-js#99, has been fixed getstream.io team.
@jeltef:
i found out problem. meteor has own browser fallback request lib has different default withcredentials. overrides request browser library mentioned before. pr #100 should fix setting withcredentials explicitly.
...
i merged master, can use install there until released.
thank hard work!
Comments
Post a Comment