Skip to content

Commit

Permalink
Merge pull request #42 from adetokunbo/update-readme-example
Browse files Browse the repository at this point in the history
Use defaultSettings in the README.md example
  • Loading branch information
adetokunbo authored Oct 28, 2024
2 parents 042d4c3 + 84df0b8 commit 2fd2d81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ handled by a delegate application that proxies requests to another server.
```haskell
{-# LANGUAGE OverloadedStrings #-}

import Data.Default (Default (..))
import Network.HTTP.Client.TLS (newTlsManager)
import Network.HTTP.Types (status500)
import Network.Wai
import Network.Wai.Handler.Warp (run)
import Network.Wai.Middleware.Delegate (ProxySettings (..), delegateToProxy)
import Network.Wai.Middleware.Delegate (ProxySettings (..),
defaultSettings,
delegateToProxy)

demoSettings :: ProxySettings
demoSettings = def { proxyHost = "httpbin.org" }
demoSettings = defaultSettings { proxyHost = "httpbin.org" }

-- | An trivial app that proxies every request to httpbin.org
httpBin :: ProxySettings -> IO Application
Expand Down

0 comments on commit 2fd2d81

Please sign in to comment.