free-http: An HTTP Client based on Free Monads.
`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]
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
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1.0.1, 0.1.0.2, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.2.0 |
---|---|
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:21Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 4492 total (13 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |