@hackage wreq-effectful0.1.1.1

Adaptation of the wreq library for the effectful ecosystem.

wreq-effectful

Adaptation of the wreq library for the effectful ecosystem.

Example

A sample usage for logging to both standard output and Elasticsearch:

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Effectful
import Effectful.Wreq
import Control.Lens

main :: IO ()
main = runEff . runWreq $
    getWith (defaults & header "Accept" .~ ["application/json"]) "https://hackage.haskell.org/users/" >>=
    asValue >>=
    liftIO . print . (^. responseBody)