Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

Commit

Permalink
response body will now always attempt to unpack rather than relying o…
Browse files Browse the repository at this point in the history
…n body template constant
  • Loading branch information
BradMclain committed Nov 14, 2016
1 parent 942ebc8 commit d025789
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rest/json/Client.js
Expand Up @@ -171,9 +171,14 @@ prestans.rest.json.Client.prototype.dispatchRequest = function(request, callback
// Remove this from the list
goog.array.remove(this.cancelableRequestIds_, request.getIdentifier());

// try to parse the response body
var responseJson_ = null;
if(request.getResponseModel() != prestans.rest.json.Response.EMPTY_BODY)
try {
responseJson_ = response.target.getResponseJson();
}
catch(error) {

}

var responseConfig_ = {
requestIdentifier: request.getIdentifier(),
Expand Down

0 comments on commit d025789

Please sign in to comment.