@@ -136,12 +136,16 @@ requestToClientRequest burl r = Client.defaultRequest
136136 let orig = toList $ requestHeaders r
137137 in maybe orig (: orig) contentTypeHdr
138138 , Client.requestBody = body
139+ , Client.secure = isSecure
139140 }
140141 where
141142 (body, contentTypeHdr) = case requestBody r of
142143 Nothing -> (Client.RequestBodyLBS "", Nothing)
143144 Just (RequestBodyLBS body', typ)
144145 -> (Client.RequestBodyLBS body', Just (hContentType, renderHeader typ))
146+ isSecure = case baseUrlScheme burl of
147+ Http -> False
148+ Https -> True
145149
146150catchConnectionError :: IO a -> IO (Either ServantError a)
147151catchConnectionError action =