haskell-servant / haskell-servant/servant

servant-client requires charset in Accept PlainText

Open
#1,002 7 comments 1 reaction 0 assignees View on GitHub
enhancement help wanted newcomer-friendly servant-api
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

The current implementation is

```haskell
instance Accept PlainText where
contentType _ = "text" M.// "plain" M./: ("charset", "utf-8")
```

Trying to parse `text/plain` yields `UnsupportedContentType text/plain`

One API I'm calling does not specify the charset so I can't use `PlainText`, but this does the job:

```haskell
data PT
instance Accept PT where
contentType _ = "text" M.// "plain"
```

The workaround is simple, but could/should the charset be made optional?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.