home/juno/projects/haskell/metric-collector/Main.hs:16:27: error:
• Couldn't match type ‘[Char]’
with ‘http-client-0.6.4.1:Network.HTTP.Client.Types.Request’
Expected type: http-client-0.6.4.1:Network.HTTP.Client.Types.Request
Actual type: String
• In the first argument of ‘httpJSON’, namely ‘etcd_url’
In a stmt of a 'do' block: response <- httpJSON etcd_url
In the expression:
do etcd_url <- getEnv "ETCD_URL"
print etcd_url
response <- httpJSON etcd_url
putStrLn
$ "The status code was: " ++ show (getResponseStatusCode response)
....
|
16 | response <- httpJSON etcd_url
| ^^^^^^^^
компилятор говорит, что httpJSON принимает одно, а вы даёте другое