mirror of https://github.com/status-im/web3.js.git
Merge pull request #59 from cubedro/master
Added check.status in httpsync.js
This commit is contained in:
commit
001077e0b9
|
@ -1051,8 +1051,10 @@ HttpSyncProvider.prototype.send = function (payload) {
|
|||
request.open('POST', this.host, false);
|
||||
request.send(JSON.stringify(payload));
|
||||
|
||||
// check request.status
|
||||
var result = request.responseText;
|
||||
// check request.status
|
||||
if(request.status !== 200)
|
||||
return;
|
||||
return JSON.parse(result);
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,8 +37,10 @@ HttpSyncProvider.prototype.send = function (payload) {
|
|||
request.open('POST', this.host, false);
|
||||
request.send(JSON.stringify(payload));
|
||||
|
||||
// check request.status
|
||||
var result = request.responseText;
|
||||
// check request.status
|
||||
if(request.status !== 200)
|
||||
return;
|
||||
return JSON.parse(result);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue