haskell-servant/servant
Auf GitHub ansehenservant-client requires charset in Accept PlainText
Open
#1.002 geöffnet am 2. Juli 2018
enhancementhelp wantednewcomer-friendlyservant-api
Repository-Metriken
- Stars
- (1.953 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 23h 44m) (4 gemergte PRs in 30 T)
Beschreibung
The current implementation is
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:
data PT
instance Accept PT where
contentType _ = "text" M.// "plain"
The workaround is simple, but could/should the charset be made optional?