Skip to content

Commit

Permalink
fix Chain.sendTx
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Dec 23, 2014
1 parent 0506ff8 commit a9dd840
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/network/Chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@ Chain.prototype._getRequestURL = function (path) {
*/
Chain.prototype._request = function (path, data) {
var requestOpts = {
method: _.isUndefined(data) ? 'GET' : 'POST',
method: 'GET',
uri: this._getRequestURL(path),
body: JSON.stringify(data),
timeout: this._requestTimeout,
zip: true,
json: true
}

if (!_.isUndefined(data)) {
requestOpts.method = 'POST'
requestOpts.json = data
}

return Q.nfcall(request, requestOpts).spread(function (response, body) {
if (response.statusCode === 200) {
return body
Expand Down

0 comments on commit a9dd840

Please sign in to comment.