Imgur Uploads Working Via Client-side Javascript But Not Node.js. Flummoxed
This works: $.post( 'http://api.imgur.com/2/upload.json', { key: 'dsfdwerwersf53534dfsfse3', image: 'http://i.imgur.com/UH17u.png'
Solution 1:
jQuery does sometime so much magie that it is hard to see it.
Here I'd bet two thing either, I have not used superagent in month and I had stupid error like this one that made me sad.
But here I bet that the body is a to string at best a json or your object. JQuery by default urlencode just like most API want the POST body to be. Use
var = require('querystring');
/*...*/
.send(qs.encode({ key: '...', image: '...' }))
Post a Comment for "Imgur Uploads Working Via Client-side Javascript But Not Node.js. Flummoxed"