Commit graph

160 commits

Author SHA1 Message Date
Teo Camarasu
3f6886ad2d Bump depedency bounds 2022-10-27 13:05:38 +01:00
Maxim Koltsov
f5a91d20e1
Merge pull request #1568 from haskell-servant/maksbotan/stackage-deps
Allow hspec-2.9, lens-aeson-1.2
2022-03-22 23:43:22 +01:00
Gaël Deest
658217b021 Use toEncodedUrlPiece directly when encoding captures
Current implementation of captures uses the `toUrlPiece` method from the
`ToHttpApiData` typeclass, and encodes the resulting `Text` using `toEncodedUrlPiece`
when appending to the request path.

The problem with this approach is that the instance for `Text` percent-encodes
characters that are perfectly valid in URLs, such as `*`.

This patch makes direct use of `toEncodedUrlPiece`, which lets users implement
encoding according to their needs.

Closes #1511
2022-03-21 17:29:23 +01:00
Gaël Deest
af3dde1b1d
Merge pull request #1566 from haskell-servant/fix-operator-doc
Fix haddock documentation for (//) and (/:)
2022-03-21 16:14:47 +01:00
Maxim Koltsov
ced5f1a655
Allow hspec-2.9 2022-03-21 15:44:10 +01:00
Gaël Deest
0c80bc8f8e Fix haddock documentation for (//) and (/:)
The examples for these two operators weren't displayed properly due to invalid Haddock markup.
2022-03-21 14:18:49 +01:00
Janus Troelsen
17e3eb1041 Allow GHC 9.2 for compatible packages 2022-03-08 08:59:35 -06:00
Giorgio Marinelli
d05da71f09
Export encoding function for a query parameter value (#1549) 2022-03-01 15:22:25 +01:00
Janus Troelsen
67da8514a0 Allow newer hashable, lens, text 2022-02-06 16:12:25 -06:00
Gaël Deest
b17d018d3f Changelog tweaks + servant-http-streams / servant-docs bump 2022-02-01 12:29:31 +01:00
Gaël Deest
e4945740aa Prepare 0.19 release 2022-02-01 10:17:03 +01:00
Gaël Deest
aab7e0d5dd Custom errors for HasClient, HasServer 2022-01-18 16:25:05 +01:00
Matthieu Coudron
73c87bc2bc
bumped cabal-version field (#1498)
* bumped cabal-version field

Cabal supports two types of licenses, native and SPDX, which can be seen here hackage.haskell.org/package/Cabal-3.6.2.0/docs/Distribution-Types-PackageDescription.html#v:licenseRaw

Several packages use BSD-3-Clause as a license, in conjonction with cabal-version: >=1.10 which cabal parses as Right (UnknownLicense "BSD-3").
If I change teh cabal-version to cabal-version: 2.2 , cabal correctly identifdies the license License (ELicense (ELicenseId BSD_3_Clause)).

* changed license from cabal to spdx format

aka BSD3 -> BSD-3-Clause: next cabal may deprecate the old format
2022-01-04 22:06:23 +01:00
Giorgio Marinelli
29d2553e74
Derive HasClient good response status from Verb status (#1469) 2021-12-09 10:09:18 +01:00
antoine-fl
cb294aa2b3
Fix Request's Show instance (#1492) 2021-12-01 19:16:59 +01:00
Caroline GAUDREAU
9a3979926d
Merge pull request #1475 from akhesaCaro/aeson_2
support Aeson 2
2021-11-26 17:25:56 +01:00
akhesacaro
05ef0dd1d3 Allow using aeson 1 (lax with min-bounds) 2021-11-26 17:14:31 +01:00
akhesacaro
e01188aaad min bound aeson 2 2021-11-18 11:56:32 +01:00
Gaël Deest
f2bd982eaf Rename proof to g{Client,Server,Link}Proof 2021-11-18 10:25:36 +01:00
Gaël Deest
575aa70eca Cleanup 2021-11-18 10:11:45 +01:00
Gaël Deest
d81c8d9911 Add parameter-supplying operator
Renamed `(/:)` to `(//)`, and used `(/:)` for supplying parameters to
client functions.

Should close #1442.
2021-11-18 10:11:45 +01:00
Gaël Deest
6718752b4a Add (/:) operator 2021-11-18 10:11:31 +01:00
Gaël Deest
5f8aaec146 Fix client tests 2021-11-18 10:11:31 +01:00
Gaël Deest
fca59556dd Code reorganization
Move `HasServer (NamedRoutes routes)` instance

The instance has been moved to `Servant.Server.Internal`, as the
instances for other combinators. It is necessary so that the instance
can be re-exported from `Servant.Server` without circular imports.

Otherwise, users have to import `Servant.Server.Generic` manually ;
forgetting to do so will produce confusing error messages about the
missing instance.

Move `HasClient (NamedRoutes routes)` instance

Moved so that the instance is made available when importing
`Servant.Client`, avoiding possibly confusing errors when
`Servant.Client.Generic` isn't imported.
2021-11-18 10:09:58 +01:00
Gaël Deest
861cd4f997 Exclude quantified constraints code for GHCJS
QuantifiedConstraints isn't available for GHC 8.4 (where our GHCJS
version is still stuck).

We may need to take a drastic decision for GHCJS at some point.
2021-11-18 10:09:58 +01:00
Gaël Deest
5ead291f8d Implementation of HasClient
Follows the same design as `HasServer` in the previous commit.

A test has been added (which incidentally acts as a test for the
HasServer instance).
2021-11-18 10:09:58 +01:00
Théophile Choutri
4e4ad495ef Change the license value to a valid SPDX identifier 2021-10-31 22:37:56 +01:00
Caroline GAUDREAU
26b01f03f2
Merge pull request #1432 from GambolingPangolin/fixes-1418
Addresses problem with URL encodings
2021-10-24 09:24:57 +02:00
Gaël Deest
b7c6a95929 Fix tested-with fields in Cabal files
Also re-added `servant-client` to `cabal.ghcjs.project`, setting
`buildable: False` on tests as they don't run with GHCJS.
2021-10-11 10:35:40 +02:00
Ian Shipman
9666f1956b Addresses problems with URL encodings
This changes the way URL encoding for query parameters is handled,
making it possible to correctly encode arbitrary binary data into query
parameter values.

Closes #1418
2021-10-03 09:57:55 -05:00
akhesacaro
e56f0092d7 remove tested-with (GHC < 8.6.5) from cabal 2021-10-02 13:13:33 +02:00
akhesaCaro
6e5dffbb91 unsupporting GHC < 8.6.5, removing unecessary imports 2021-10-02 13:13:24 +02:00
Maxim Koltsov
e2b897d3c0
Prepare 0.18.3 release (#1430) 2021-06-24 00:38:46 +03:00
Maxim Koltsov
61111178f0
Support GHC-9.0.1 2021-06-23 23:06:07 +02:00
Paolo Capriotti
0f9cc7eeec
Add response header support to UVerb (#1420)
* Use type wrapped in Headers h to generate response

This avoids having to define MimeRender instances for Headers.
2021-06-10 17:10:50 +02:00
Maxim Koltsov
507f0a4671
Allow hspec < 2.9
https://github.com/commercialhaskell/stackage/issues/6010
2021-05-14 12:34:04 +03:00
Bodigrim
27173c9223
Allow bytestring-0.11 (#1386) 2020-12-16 11:04:49 +01:00
Ondřej Súkup
7412ac3472
Update upper bound limit of base64-bytestring (#1383) 2020-12-11 21:15:27 +01:00
Alexey Kuleshevich
08579ca003
Update upper bounds for QuickCheck (#1375) 2020-12-05 20:49:11 +01:00
Arian van Putten
f7dc40ca8d
servant-client-core: depend on 0.18.2 (#1366) 2020-11-25 15:06:45 +03:00
Maxim Koltsov
0ad2bd221a
Prepare 0.18.2 release (#1364) 2020-11-22 17:51:32 +03:00
Andrey Prokopenko
ce638027a8
Remove extra parameter from haddock section of Fragment instances (#1362) 2020-11-22 11:08:32 +01:00
Andrey Prokopenko
da0c83d318
Add URI fragment as a separate combinator (#1324) 2020-11-18 21:57:20 +03:00
Maxim Koltsov
4c72c08830
Update inter-library version constraints 2020-11-05 10:48:38 +03:00
Maxim Koltsov
bd698cad3b
Bump version in preparation for new release 2020-11-04 17:06:51 +03:00
fisx
c1105899f4
union verbs (#1314) 2020-10-31 20:45:46 +01:00
fisx
64f3543034
bump "tested-with" ghc versions. (#1350) 2020-10-25 14:24:06 +01:00
Alejandro Serrano
0c0fe5b9d3
Loosen bound on base16-bytestring (#1348) 2020-10-12 13:28:35 +02:00
Matthias Fischmann
6dcb29bada
Update changelogs. 2020-07-31 20:19:07 +02:00
Maxim Koltsov
43cf589e0e
Bump version to 0.18 2020-07-30 19:03:58 +03:00