haskell-servant/servant

client streaming + http redirect result into runtime exception

Open

#1091 opened on Nov 28, 2018

View on GitHub
 (7 comments) (0 reactions) (0 assignees)Haskell (1,953 stars) (422 forks)batch import
enhancementhelp wanted

Description

If an http endpoint returns a redirect (for example http -> https upgrade), streaming client errors out:

HasClient @StreamBody
CallStack (from HasCallStack):
  error, called at src/Servant/Client/Core/Internal/HasClient.hs:550:44 in servant-client-core-0.15-KKVc3oxuLh47HhicA3CWtB:Servant.Client.Core.Internal.HasClient                                                                                                                                                     

https://github.com/haskell-servant/servant/blob/master/servant-client-core/src/Servant/Client/Core/Internal/HasClient.hs#L550

Contributor guide