@hackage / wreq-effectful

Adaptation of the wreq library for the effectful ecosystem.

Latest0.1.1.1

About

Metadata

  • Last updated , by Pingu
  • License MIT
  • Categories Web Development
  • Maintained by: nor@acorneroftheweb.com

  • Lottery factor: 1

Links

Installation

Readme

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)