javascript - telegram-mt-node POST response OK, but buffer expects Uint8Array but gets TypedArray -
i working on telegram web client app , able make successful post , encrypted response telegram server inside telegram-mt-node
the root of problem comes down buffer array parsed after response:
uncaught typeerror: "list" argument must array of buffers
the array expects in telegram-mt-node is: uint8array, receives typedarray instead.
first post header is:
accept:*/* accept-encoding:gzip, deflate accept-language:en-us,en;q=0.8 cache-control:no-cache connection:keep-alive content-length:40 host:149.154.167.40:443 origin:null pragma:no-cache user-agent:mozilla/5.0 (macintosh; intel mac os x 10_10_5) applewebkit/537.36 (khtml, gecko) chrome/49.0.2623.87 safari/537.36
the request payload encrypted
the response header is:
access-control-allow-headers:origin, content-type access-control-allow-methods:post, options access-control-allow-origin:* access-control-max-age:1728000 cache-control:no-store connection:keep-alive content-length:84 content-type:application/octet-stream pragma:no-cache
with status code: 200 ok.
the response encrypted.
this happening inside telegram-mt-node. https://github.com/enricostara/telegram-mt-node
i using sample.js file started: https://github.com/dot-build/telegram-js/blob/master/sample.js
Comments
Post a Comment