The wreq-stringless package

[ Tags: library, mit, web ] [ Propose Tags ]

This library wraps all functions from Network.Wreq which expects a String and replaces the String Type with the Network.Wreq.StringLess.StringLike Type-Class.

Instances for Network.Wreq.StringLess.StringLike are given for:

So you can use any of this types instead of String.

To use this library, replace your the wreq dependency from your cabal file with wreq-stringless and import Network.Wreq.StringLess instead of Network.Wreq.

The versions of this library correspond with the version of wreq.

see for examples.

[Skip to Readme]


Dependencies base (>=4.7 && <5), bytestring, text, utf8-string, wreq (== [details]
License MIT
Author Juergen Keck
Maintainer Juergen Keck <>
Category Web
Home page
Bug tracker
Source repository head: git clone
Uploaded Mon Aug 7 13:00:07 UTC 2017 by jkeck
Distributions NixOS:, Stackage:
Downloads 180 total (13 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-08-07 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for wreq-stringless-

[back to package description]

wreq-stringless: Simple wrapper to use wreq without Strings

This Haskell library wraps Network.Wreq to use the functions without Strings.

You can use:

  • Data.Text
  • Data.Text.Lazy
  • Data.ByteString.UTF8
  • Data.ByteString.Layz.UTF8

for all functions from Network.Wreq where the original implementation use Strings.


{-# LANGUAGE OverloadedStrings #-}
module Main where

import qualified Data.Text               as T
import           Lens.Micro.Extras       (view)
import qualified Network.Wreq            as Wreq
import qualified Network.Wreq.StringLess as Wreq'

-- say we use a alternate prelude like 'Protolude', and we don't use Strings
-- or we have the url from somewhere else, and it's not a String.
url :: T.Text
url = ""

main :: IO ()
main = do
  -- with plain wreq
  view Wreq.responseStatus  <$> Wreq.get (T.unpack url) >>= print

  -- with wreq-stringless - no manual conversion necessary
  view Wreq'.responseStatus <$> Wreq'.get url >>= print

How to use it:

  • replace your wreq dependency with wreq-stringless
  • replace the import Network.Wreq with Network.Wreq.StringLess

The versions of this library correspond with the version of wreq. So if you need wreq- you add wreq-stringless- as a dependency.

If you use stack, add the following yaml snippet to your 'stack.yaml'

  - wreq-stringless-