Skip to content

Commit

Permalink
clientReq Headers bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush24401 committed Feb 1, 2024
1 parent 7aecc6e commit 9ed1c92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapi/src/WebApi/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ toClientRequest extraUnres clientReq req = do
now <- liftIO getCurrentTime
let accHeader = maybe [] singleton ((hAccept,) <$> (getRawAcceptHeader req))
singleton x = [x]
cReqQP = HC.setQueryString queryPar clientReq
cReqQP = HC.setQueryString queryPar (clientReq { HC.requestHeaders = accHeader })
ckJar = HC.createCookieJar (cks now)
cReqUE = if Prelude.null formPar
then cReqQP
Expand All @@ -201,7 +201,7 @@ toClientRequest extraUnres clientReq req = do
s <- cReqMP
let s' = s { HC.method = singMethod (Proxy :: Proxy m)
, HC.path = uriPath
, HC.requestHeaders = accHeader ++ (toHeader $ headerIn req)
, HC.requestHeaders = HC.requestHeaders s ++ (toHeader $ headerIn req)
, HC.cookieJar = Just ckJar
}
return s'
Expand Down

0 comments on commit 9ed1c92

Please sign in to comment.