-
Notifications
You must be signed in to change notification settings - Fork 36
Shift doesn't work #2
Comments
No, I use it daily in http://www.exodus.io/
Ah, ok. I don't use the browser http transport personally. That may be why. Are you using npm by chance? |
Nope, I am using the file you compiled with browserify I guess. |
Thanks for the catch on 'GET' vs 'POST'... change ( shapeshift.io/dist/shapeshift.js Line 13 in 47147a5
xhr({ method: 'GET', url: url, json: true, timeout: 30000, data: data }, function (err, resp, body) { to xhr({ method: 'POST', url: url, json: true, timeout: 30000, body: JSON.stringify(data) }, function (err, resp, body) { Note the changes: Let me know if that works. |
Did this work for you? |
Thanks, I gave up and decided to write my own library, I only needed one On Sat, Mar 19, 2016 at 10:32 AM, JP Richardson [email protected]
❝ Nicolò Paternoster |
@jprichardson I think that right request should be: xhr({ method: 'POST', url: url, json: data, timeout: 30000 }, function (err, resp, body) { and xhr({ method: 'GET', url: url, json: undefined, timeout: 30000 }, function (err, resp, body) { |
Is this library outdated ?
I am using the dist js file and cannot shift.
the post method is actually calling a get :
I changed to method:'POST' and now got a json error
Invalid or poorly formed JSON
.The text was updated successfully, but these errors were encountered: