diff --git a/src/Network/HTTP/Affjax.js b/src/Network/HTTP/Affjax.js index b4c5533..034aba2 100644 --- a/src/Network/HTTP/Affjax.js +++ b/src/Network/HTTP/Affjax.js @@ -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; @@ -85,4 +86,3 @@ exports._ajax = function () { }; }; }(); - diff --git a/src/Network/HTTP/Affjax.purs b/src/Network/HTTP/Affjax.purs index 59451fd..36f47ad 100644 --- a/src/Network/HTTP/Affjax.purs +++ b/src/Network/HTTP/Affjax.purs @@ -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 }