Skip to content

Commit

Permalink
Merge pull request #24 from slamdata/ie-json
Browse files Browse the repository at this point in the history
Fix Respondable Foreign instance for IE
  • Loading branch information
jdegoes committed Jun 8, 2015
2 parents 4765623 + f51ad72 commit 568bc7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Network/HTTP/Affjax/Response.purs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ responseTypeToString :: forall a. (ResponseType a) -> String
responseTypeToString ArrayBufferResponse = "arraybuffer"
responseTypeToString BlobResponse = "blob"
responseTypeToString DocumentResponse = "document"
responseTypeToString JSONResponse = "json"
responseTypeToString JSONResponse = "text" -- IE doesn't support "json" responseType
responseTypeToString StringResponse = "text"

-- | Type representing content types that be received from an XHR request
Expand All @@ -64,7 +64,7 @@ instance responsableDocument :: Respondable Document where

instance responsableJSON :: Respondable Foreign where
responseType = JSONResponse
fromResponse = Right
fromResponse = readString >=> parseJSON

instance responsableString :: Respondable String where
responseType = StringResponse
Expand Down

0 comments on commit 568bc7b

Please sign in to comment.