Skip to content
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

Problem with passing an Array as data #35

Closed
molnarg opened this issue Nov 25, 2011 · 1 comment
Closed

Problem with passing an Array as data #35

molnarg opened this issue Nov 25, 2011 · 1 comment
Labels

Comments

@molnarg
Copy link

molnarg commented Nov 25, 2011

Superagent cannot handle Array as data parameter. In node.js, it throws this error:

TypeError: Second argument should be a buffer
  at Socket._writeImpl (net.js:159:14)
  at Socket._writeOut (net.js:444:25)
  at Socket.flush (net.js:523:24)
  at Socket._onWritable (net.js:603:12)
  at Socket._onConnect (net.js:591:12)
  at IOWatcher.onWritable [as callback] (net.js:186:12)

In the browser there is a problem with the JSON serialization: if the data parameter is [1,2,3], the data sent is "1,2,3" instead of "[1,2,3]"

@tj
Copy link
Contributor

tj commented Nov 25, 2011

weird, i marked it as a bug i'll have look when i can

@tj tj closed this as completed Dec 22, 2011
@tj tj reopened this Dec 22, 2011
@tj tj closed this as completed in 48f8916 Dec 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants