-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
superagent.get(...).buffer is not a function #1517
superagent.get(...).buffer is not a function #1517
Comments
For me it works in node but I get the same error in the browser |
Getting the same error When upgrading from 4.1.0 -> 5.x:
|
PR welcome if you can find the fix! |
I wrote a try catch statement: |
OK I see the issue. In the older version, client version had this: https://github.com/visionmedia/superagent/blob/v4.1.0/lib/client.js#L631-L635 In newer version, we have this: Request.prototype.buffer = Request.prototype.ca;
Request.prototype.ca = Request.prototype.agent; The order in the newer version when I did the rewrite got reversed. I'm fixing it now and publishing a new version. |
Very good. Unfortunately I meanwhile have a different code that is only run on the server so we do not need the fix any more... |
@niftylettuce 5.2.1 fixed the bug for me. Thank you! |
installed through npm
Having trouble using simple buffer function.
results in
superagent.get(...).buffer is not a function
Any help would be greatly appreciated, from all the guides and sample code I've read through, this should work fine.
The text was updated successfully, but these errors were encountered: