23 lines
1 KiB
Markdown
23 lines
1 KiB
Markdown
[![Hackage](https://img.shields.io/hackage/v/http-barf.svg)](https://hackage.haskell.org/package/http-barf) [![ci](https://ci.mangoiv.com/api/badges/11/status.svg)](https://ci.mangoiv.com/repos/11)
|
|
|
|
# http barf
|
|
|
|
HTTP barf is a dead simple library to make http requests. It provides helper functions to use different http methods, it supports
|
|
both insecure and secure connections without having to deal with managers and the requests can be trivially modified using a monoidal
|
|
combinator library.
|
|
|
|
You may use it if you just have to vomit out a quick script and don't want to deal with all the complexities of involving a library
|
|
that provides more features or more safety guarantees.
|
|
|
|
## Example
|
|
|
|
```haskell
|
|
λ GHCi ~ res <- get_ "https://jsonplaceholder.typicode.com/posts" [q_ "userId" "1"]
|
|
res :: Data.ByteString.Lazy.Internal.LazyByteString
|
|
(0.40 secs, 6,838,760 bytes)
|
|
λ GHCi ~ decode @Value res
|
|
Just (Array [Object (fromList [("body",String "quia et suscipit\nsuscipit ...
|
|
it :: Maybe Value
|
|
(0.01 secs, 3,324,080 bytes)
|
|
```
|