http-api-data
http-api-data copied to clipboard
Converting to/from HTTP API data like URL pieces, headers and query parameters.
- support generic via deriving ala `deriving (FromForm, ToForm) via Generically MyType`
Hi, I’m wondering if it’d make sense to have a special handling for Booleans in GFromForm like we have for Maybe. It’d make sense to write an instance that parses...
Hi, I wonder whether there is some preferred, idiomatic way to deal with things like ```haskell data A = MkA { a1 :: Text , a2 :: B } deriving...
Hi @fizruk! I'm a long-time Servant user (and thus of `http-api-data`), and I'd like to suggest a solution to prevent the `anyclass` deriving strategy of `ToHttpApiData` and `FromHttpData` via a...
* This type uses a HashMap: https://hackage.haskell.org/package/http-api-data-0.4.3/docs/Web-FormUrlEncoded.html#t:Form * The package in which `HashMap` is defined: Unordered containers specifically mentions: "This package currently provides no defenses against hash collision attacks such...
It would be nice to add ToHttpApiData instances for ToJSON instances like so ``` instnace (ToJSON a) => ToHttpApiData a where toQueryParam = toStrict . encodeToLazyText ```
Does it make sense to have: ```haskell instance (FromForm a, FromForm b) => FromForm (a, b) where fromForm f = (,) fromForm f fromForm f ``` and ditto for Either?
I was trying to write my own `ToHttpApiData` instance for a newtype wrapper over text, and ended up looking at the [existing instance for `Text`](https://www.stackage.org/haddock/lts-12.1/http-api-data-0.3.8.1/src/Web.Internal.HttpApiData.html#line-491) and was surprised to find...
I was hoping `readTextData` and `showTextData` would form a nice bijection, so that I could easily derive the ability to send my custom types over the wire without too much...