Skip to content

Commit

Permalink
bug fix- post api request headers missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush24401 committed Feb 1, 2024
1 parent 9ed1c92 commit ffaacf7
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 { HC.requestHeaders = accHeader })
cReqQP = HC.setQueryString queryPar clientReq
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 = HC.requestHeaders s ++ (toHeader $ headerIn req)
, HC.requestHeaders = HC.requestHeaders s ++ accHeader ++ (toHeader $ headerIn req)
, HC.cookieJar = Just ckJar
}
return s'
Expand Down

0 comments on commit ffaacf7

Please sign in to comment.