Skip to content

v7.0.0

Compare
Choose a tag to compare
@garyb garyb released this 12 Aug 22:05
423ee7a

Lots of things were renamed in this release to better match their current functionality.

  • The affjax function is now request
  • The AffjaxRequest record is now Request
  • The AffjaxResponse record is now Response
  • The response field of Response is now body
  • The Request type is now RequestBody
  • The Response type is now ResponseFormat
  • The Request record now has a responseFormat field, rather than it being a separate argument to request

(Most of the new names by @paldepind).

Additionally, errors that occur during decoding a response no longer cause an entire request to fail. The body value is now Either ResponseFormatError a, so that other details about the response can still be inspected (status code, for example), even if the response body fails to decode. The ResponseFormatError value also carries the response body as a Foreign value, in case there is some further special handling that can be performed externally.