Rest API library.

Latest on Hackage:

See all snapshots rest-core appears in

BSD-3-Clause licensed
Maintained by [email protected]

Module documentation for

This version can be pinned in stack with:[email protected]:40872bfa9f1e32faba292829d1fc1598583899e219c8f299bab5c32bc954e729,1943
  • Rest
    • Rest.Api
    • Rest.Container
    • Rest.Dictionary
      • Rest.Dictionary.Combinators
      • Rest.Dictionary.Types
    • Rest.Driver
      • Rest.Driver.Perform
      • Rest.Driver.RestM
      • Rest.Driver.Routing
      • Rest.Driver.Types
    • Rest.Error
    • Rest.Handler
    • Rest.Info
    • Rest.Resource
    • Rest.Run
    • Rest.Schema
    • Rest.ShowUrl

Rest API library.



  • 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.


  • Move Range from Rest.Handler into rest-types. Still re-exported.


  • Added a Rest.Types.Error.ToResponseCode constraint to jsonE, xmlE, and xmlJsonE.
  • Changed domainReason to have a ToResponseCode constraint instead of an explicit argument.
  • Added Rest.ShowUrl re-exporting ShowUrl from rest-types.
  • application/* and application/octet-stream accept headers now match file outputs.

  • Allow random 1.1.*

  • Fix bug in Chrome when serving files with commas in name.


  • Add addHeader dictionary combinator, to extend instead of replace the header dictionaries. For this, a constructor TwoHeaders was added to Header.
  • Relax the types of mkListing and mkOrderedListing to allow parameters and headers.


  • Expose Rest.Driver.Routing.splitUriString.
  • Make test cases compile again.


  • Schema: action has been renamed to static since it is tied to statics and to disambiguate it from the unrelated actions.

  • Use json-schema 0.5.*

  • Use rest-stringmap == 0.2.*

  • Allow mtl == 2.2.* and transformers == 0.4.*


  • Use Content-Disposition to 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.StringMap Has 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 <map><value key="k">v</value>[...]</map>.


  • 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: private header on served files. This way they can be cached by public proxies, e.g. cloudfront.
  • Add Show instances for Header, Param and Dict.
  • Renamed mkMultiPutHandler to mkMultiHandler in Rest.Driver.Routing.
  • Explicit exports in Rest.Driver.Routing, removing a lot of private functions from the public interface.