Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

curl transfer closed with JSON.parse #1241

Closed
saturngod opened this issue Jun 28, 2011 · 1 comment
Closed

curl transfer closed with JSON.parse #1241

saturngod opened this issue Jun 28, 2011 · 1 comment

Comments

@saturngod
Copy link

I got curl: (18) transfer closed with outstanding read data remaining
problem in following code. console.log is working fine but I can't call url in browser and curl.

res.writeHead(200, {'Content-Type': 'text/plain'});
output=JSON.parse(output);
console.log(output);
res.end(output);
@isaacs
Copy link

isaacs commented Jun 28, 2011

It looks like you're calling res.end() with an object. Maybe you meant JSON.stringify rather than JSON.parse?

@isaacs isaacs closed this as completed Jun 28, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants