free-http: An HTTP Client based on Free Monads.
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
`free-http` is an http-client based on Free Monads.
`free-http` exposes a Free Monad to express standard http
verbs as well as several backends to interpet programs
written in the free monad using various http clients
(currently: a pure client, an `http-client`-backed client,
and a random client).
To use free-http, simply:
1. Import Network.HTTP.Client.Free to use the library.
2. Choose your base request type by defining your own
instance of the RequestType
type family or importing
one from an interpreter. E.g.
data MyClient
type instance RequestType MyClient = Request
(or)
import Network.HTTP.Free.Client.HttpClient (HttpClient)
3. Choose your base response type by defining your own
instance of the ResponseTYpe
type family or importing
one from an interpreter. E.g.
type instance ResponseType MyClient = Response ByteString
(or)
import Network.HTTP.Free.Client.HttpClient (HttpClient)
4. Write a program in the 'FreeHttp MyClient m a' free monad.
5. Import an interpreter, such as HttpClient
import Network.HTTP.Free.Client.HttpClient
6. Run your program against the interpreter:
runHttp (myProgram :: FreeHttp MyClient IO String)
[Skip to Readme]
Properties
Versions | 0.1.0.1, 0.1.0.2, 0.1.1.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.2.0 |
---|---|
Change log | None available |
Dependencies | base (>4.6 && <4.9), bytestring (>=0.10.0.0), free (>=4.0), http-client (>=0.4.0), http-types (>=0.8.0), mtl (>=2.0.0.0), QuickCheck (>=2.7), text (>=1.0.0.0), time (>=1.4.0.1), transformers (>=0.4.0.0) [details] |
License | MIT |
Author | Aaron Levin |
Maintainer | vilevin@gmail.com |
Category | Network |
Home page | https://github.com/aaronlevin/free-http |
Source repo | head: git clone git://github.com/aaronlevin/free-http.git |
Uploaded | by aaronlevin at 2015-07-14T03:34:16Z |
Modules
[Index]
Downloads
- free-http-0.1.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees