Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #202 from drewfish/yui351-fixups5
Browse files Browse the repository at this point in the history
status code and message that works on the client too.  headers returned as a string
  • Loading branch information
Isao Yagi committed Jun 11, 2012
2 parents e8d80cb + be0a5b9 commit 951b7de
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/lib/app/autoload/rest.common.js
Expand Up @@ -27,17 +27,16 @@ YUI.add('mojito-rest-lib', function(Y, NAME) {

ResponseObject.prototype = {
getStatusCode: function() {
return this._resp.statusCode;
return this._resp.status;
},
getStatusMessage: function() {
return this._resp.status;
return this._resp.statusText;
},
getHeader: function() {
return this._resp.getResponseHeader.apply(this._resp, arguments);
},
getHeaders: function() {
// caller expects object
return Y.clone(this._resp.headers, true);
return this._resp.getAllResponseHeaders();
},
getBody: function() {
return this._resp.responseText;
Expand Down

0 comments on commit 951b7de

Please sign in to comment.