Last active
December 23, 2015 13:49
-
-
Save sayak-sarkar/6644310 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (xhr.status == 200) { | |
var responseTest = xhr.responseText; | |
var parser = new XMLRPCParser(responseTest); | |
this.response = parser.toObject(); | |
this.fault = parser.fault; | |
} | |
else if(xhr.status == 0) { | |
this.fault = true; | |
this.faultMessage = "No Response from the Server"; | |
this.faultCode = 0; | |
//this.response = parser.toObject(); //we can create an error obj here | |
} | |
else { | |
this.fault = true; | |
this.faultMessage = xhr.statusText ? xhr.statusText : "Something went wrong"; | |
this.faultCode = xhr.status; | |
//this.response = parser.toObject(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment