Module documentation for 0.35.1
Rest API library.
- Remove unneeded constraint from
Change input/output dictionaries to indicate separately if there are dictionaries, and for what type. This is a breaking change. The most likely problems are where
Reason ()is explicitly used in handlers without error dictionaries. Simply replace these with
Reason_. Additionally, all
some*combinators are deprecated now. They are just the identity function and can be removed.
The types of all dictionary combinators have changed, the Dicts type, the dicts smart constructor, empty, SomeError, Modifier, many internal (but exported) things in Rest.Driver.Perform, some types in Rest.Handler, and Void was moved.
Switched all usages of
ExceptT. To stay backwards compatible with older versions of
mtlyou can use the
mtl-compatpackages. To update your code:
Rest.Error. It combines two
ExceptTcomputations yielding the last error if both fail. This is a replacement for using
Alternative ExceptTinstance needs a
Monoidinstance for the error.
Fix typos in haddock for
Switch to explicit export lists where missing.
- Allow utf8-string 1.
- Fix for base 4.8/GHC 7.10.
- Allow setting the method in the requests in a top level multi handler.
Restclass function now returns a
Rest.Driver.Routingnow takes a
Methodtype was removed from
Rest.Driver.Typesand moved to rest-types’
- Allow top level multi handler as a POST as well as a GET. Technically, you’re not allowed to vary the response based on the body of a GET. Also, in some frameworks (e.g. jQuery) it isn’t possible to set the body of a GET.
- Typo fixes in documentation.
- Declare correct error return type for derived multi handlers. These
were declared as
Reason (Reason e), now they are
Reason (). This generated confusing documentation.
rest-types. Still re-exported.
- Added a
domainReasonto have a
ToResponseCodeconstraint instead of an explicit argument.
application/octet-streamaccept headers now match file outputs.
- Allow random 1.1.*
- Fix bug in Chrome when serving files with commas in name.
addHeaderdictionary combinator, to extend instead of replace the header dictionaries. For this, a constructor
TwoHeaderswas added to
- Relax the types of
mkOrderedListingto allow parameters and headers.
- Make test cases compile again.
actionhas been renamed to
staticsince it is tied to
staticsand to disambiguate it from the unrelated
rest-stringmap == 0.2.*
mtl == 2.2.*and
transformers == 0.4.*
Content-Dispositionto provide filenames for file responses. This slightly changes the semantics of
FileO: what used to be interpreted as the file extension is now used for the whole file name.
Rest.Types.Container.StringMapHas been replaced by
rest-stringmap. This changes the XML serialization format of multi part messages, the old format was
<map><key>k</key>v[...]</map>and the new one is
- Add multi-delete handler. It is used on a DELETE to
/<resource>/<id>/and is derived from the single delete handler.
- Don’t put
Cache-Control: privateheader on served files. This way they can be cached by public proxies, e.g. cloudfront.
- Explicit exports in
Rest.Driver.Routing, removing a lot of private functions from the public interface.