@@ -25,7 +25,6 @@ import Control.Arrow (second)
2525import Control.Lens (makeLenses, mapped, over, traversed, view, (%~),
2626 (&), (.~), (<>~), (^.), (|>))
2727import qualified Control.Monad.Omega as Omega
28−import Data.ByteString.Conversion (ToByteString, toByteString)
2928import Data.ByteString.Lazy.Char8 (ByteString)
3029import qualified Data.ByteString.Char8 as BSC
3130import qualified Data.CaseInsensitive as CI
@@ -461,12 +460,12 @@ class AllHeaderSamples ls where
461460instance AllHeaderSamples '[] where
462461 allHeaderToSample _ = []
463462
464−instance (ToByteString l, AllHeaderSamples ls, ToSample l, KnownSymbol h)
463+instance (ToHttpApiData l, AllHeaderSamples ls, ToSample l, KnownSymbol h)
465464 => AllHeaderSamples (Header h l ': ls) where
466465 allHeaderToSample _ = mkHeader (toSample (Proxy :: Proxy l)) :
467466 allHeaderToSample (Proxy :: Proxy ls)
468467 where headerName = CI.mk . cs $ symbolVal (Proxy :: Proxy h)
469− mkHeader (Just x) = (headerName, cs $ toByteString x)
468+ mkHeader (Just x) = (headerName, cs $ toHeader x)
470469 mkHeader Nothing = (headerName, "<no header sample provided>")
471470
472471-- | Synthesise a sample value of a type, encoded in the specified media types.