andyfowler/node-jsonrpc-client — Issue #1: Wrong headers for json rpc
Author: chrispaterson
Created: 2012-01-30 23:46:57+00:00
State: open

I'm not sure why this worked or didn't... I kept getting a "Cannot POST /" error when attempting to connect to a JSON RPC2 server on my localhost (just on a different port). Turns out, line 13 of /lib/index.js has .header('Accept', 'application/json'). By adding .header('Content-Type', 'application/json') I was able to get it to work. Is this module tested? I'm not sure why it would work without sending a content type...