Skip to content

Loading…

curl transfer closed with JSON.parse #1241

Closed
saturngod opened this Issue · 1 comment

2 participants

@saturngod

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

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

@isaacs isaacs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.