At first I got the same error but when I installed HTTP-4000.0.5 using Cabal your code worked.
hth,
deech
I'm trying to write a wrapper for a REST service. However, I find myself stumped by the simplest part: merely performing a GET on a URI.
I'm using the HTTP Cabal package. It specifies an example like so:
simpleHTTP (getRequest "http://www.haskell.org/") >>= fmap (take 100) . getResponseBody
However, it seems I'm either importing the library incorrectly or there is a discrepancy between the documentation and the library. I can't seem to call getRequest.
:) ghc-pkg list
...
/Users/adamkeys/.ghc/i386-darwin-6.8.2/package.conf:
Cabal-1.6.0.1, HTTP-3001.1.3, HTTP-4000.0.4, Shellac-0.9.5,
...
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> import Network.HTTP
Prelude Network.HTTP> :type getRequest
<interactive>:1:0: Not in scope: `getRequest'
Am I missing something obvious here?
--
~akk
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners