Skip to content

Commit

Permalink
Merge pull request #119 from slamdata/statustext
Browse files Browse the repository at this point in the history
Add statusText to response
  • Loading branch information
garyb authored May 27, 2018
2 parents db7ece2 + b67839a commit 253e1ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Network/HTTP/Affjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ exports._ajax = function () {
xhr.onload = function () {
callback({
status: xhr.status,
statusText: xhr.statusText,
headers: xhr.getAllResponseHeaders().split("\r\n")
.filter(function (header) {
return header.length > 0;
Expand All @@ -85,4 +86,3 @@ exports._ajax = function () {
};
};
}();

1 change: 1 addition & 0 deletions src/Network/HTTP/Affjax.purs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ defaultRequest =
-- | The type of records that will be received as an Affjax response.
type AffjaxResponse a =
{ status :: StatusCode
, statusText :: String
, headers :: Array ResponseHeader
, response :: a
}
Expand Down

0 comments on commit 253e1ad

Please # to comment.