addRequestHeader (H.hContentType, "application/json")
this is a example of the usage of Network.HTTP.Simple package, i have seen a couple of times. how does that work to pass a String to that function as its signature is:
addRequestHeader :: Network.HTTP.Types.Header.HeaderName
-> Data.ByteString.Internal.ByteString -> Request -> Request
when i try this, i get the error couldn't match expected type ‘C8.ByteString’ with actual type ‘[Char]’, so i have to use Data.ByteString.Char8.pack function to make this work. why don't the others have to do that? is there a auto-convertion or whats going on here?
{-# LANGUAGE OverloadedStrings #-}language extension. - Redu