Commit Graph

35 Commits

Author SHA1 Message Date
Oleg Grenrus 8058891299 Reformat servant 2018-03-11 17:58:31 +02:00
Oleg Grenrus 3e1748c965 Add description modifier helpers and parametrise Capture 2018-02-15 12:28:42 +02:00
Oleg Grenrus bc3f61d615 Add Servant.API.Modifiers to servant
Changes Header, ReqBody and QueryParam to take a modifier list.

Resolves https://github.com/haskell-servant/servant/issues/856

ResponseHeader story turns to be somewhat ugly, but it can be made
elegant when https://github.com/haskell-servant/servant/issues/841 is
implemnted, then we can omit HList aka Header Heterogenous List
implementation.

- servant-server changes:

  Writing server side intepretations is quite simple using
  `unfoldRequestArgument`, which makes Header and QueryParam look quite
  the same.

  `ReqBody` cannot be easily made optional with current design (what that
  would mean: No Content-Type Header?), so that dimensions isn't used
  there.

- Add HasLink for all the rest ComprehensiveAPI combinators
- Add 'tricky' Header', QueryParam' endpoints to ComprehensiveAPI
- servant-docs: Quick'n'dirty implementation. Don't use modifiers information (yet).
2018-01-25 09:10:11 +02:00
Gershom 38e87397e7 add tests, fix to make tests work 2017-11-04 00:10:29 -04:00
Gershom 0c77a2b4b0 make client endpoint give polymorphic result 2017-10-24 17:26:18 -07:00
Gershom e75a3cc37b streaming client actually streams 2017-10-24 17:12:21 -07:00
Gershom 9a2ac6f4dd HasClient instance for Stream 2017-10-20 15:09:11 -04:00
Gershom 9132a5bb84 fix indentation 2017-10-19 17:43:01 -04:00
Gershom d4168aa3ae first round of changes 2017-10-19 17:41:49 -04:00
Gershom c5e04514f9 initial checkin 2017-10-18 18:43:43 -04:00
Catherine Galkina 2e59a82d01 Add Description and Summary combinators 2017-06-08 17:35:24 +03:00
David Turner 5a65563d9a Re-export EmptyAPI(..) from Servant.API 2017-05-16 10:05:58 +00:00
Oleg Grenrus 2b12436d3b Fix tests (URI -> Link) 2017-01-16 10:47:22 +02:00
Julian K. Arni ed82056052 Add noHeader function.
Which allows not adding a header where a signature declares one, making
    response headers optional.
2016-10-21 14:36:14 +02:00
Julian K. Arni 0870b3b2f5 Remove FromFormUrlEncoded and ToFormUrlEncoded.
In favor of FromForm and ToForm from the new version of http-api-data.
2016-09-12 18:34:18 -03:00
Jonathan Lange a616a8d689 Add CaptureAll to the API definitions 2016-07-11 14:46:31 +01:00
aaron levin b3af5a8d95 Move general authentication to Experimental module
Removes the UndecidableInstances extension in the module containing the
HasServer instances.
2016-03-09 22:30:34 +01:00
aaron levin 038abb433d Add general Authentication combinators 2016-03-09 00:15:14 +01:00
aaron levin 6dc577c821 Add basic-auth data types to servant core 2016-03-08 23:08:17 +01:00
Sönke Hahn 8ef4d4543b renaming: Config -> Context 2016-03-07 23:12:24 +08:00
Sönke Hahn 67315c4487 server: added Config machinery 2016-01-21 17:55:02 +01:00
Julian K. Arni f1b6603c52 Review fixes 2016-01-08 18:03:28 +01:00
Julian K. Arni 783a849c67 Make NoContent still take an arg.
For consistency with other combinators, and to make using headers
        easier.
2016-01-07 14:30:08 +01:00
Julian K. Arni 574e9c48cd Export all Verb methods. 2016-01-07 13:47:08 +01:00
Julian K. Arni cda8bcf17c Simplify verb combinators.
Create a single 'Verb' combinator with parameters for status code and
        method. Make existing combinators type synonyms of 'Verb'.
2016-01-07 13:47:07 +01:00
Julian K. Arni afc76b8f6c Remove MatrixParam.
In servant, servant-server, and servant-client.
2015-10-13 21:37:07 +02:00
Nickolay Kudasov 40d2c68897 Use http-api-data package instead of ToText/FromText 2015-10-08 00:38:47 +03:00
Julian K. Arni 6eb7add53a stylish haskell changes
And import fix.
2015-08-18 00:07:12 +02:00
Alp Mestanogullari f39d57c6b3 add HttpVersion, IsSecure, RemoteHost and Vault combinators with instances for all interpretations (all but the server ones being 'ignore that combinator')
tighter version bounds for network

cleanup

document the new combinators

servant-server: add some tests for HttpVersion, IsSecure, RemoteHost and Vault

update changelogs

address Julian's feedback

remove vault test in servant-server

servant-server tests: -Werror friendly
2015-07-10 14:00:01 +02:00
Julian K. Arni 92d65aaf49 -Wall fixes 2015-05-03 13:36:51 +02:00
Julian K. Arni 50b05860b7 Remove Canonicalize 2015-05-03 01:45:17 +02:00
Julian K. Arni 1447221a16 Fixes for ServantErr in servant-client 2015-05-03 01:16:38 +02:00
Julian K. Arni 666e670058 Servant-blaze and servant-lucid 2015-05-02 12:04:47 +02:00
Julian K. Arni 5531ada22b Headers for all 2015-05-02 02:21:03 +01:00
Julian K. Arni 90ad8248d7 prepare merge 2015-04-20 11:21:21 +02:00