req package:wreq
A request that is ready to be submitted.
Return the URL associated with the given
Req.
This includes the port number if not standard, and the query string if
one exists.
An easy-to-use HTTP client library.
. A web client library that is designed for ease of use. . Tutorial:
http://www.serpentine.com/wreq/tutorial.html . Features
include: . * Simple but powerful
lens-based API . * A solid
test suite, and built on reliable libraries like http-client and lens
. * Session handling includes connection keep-alive and pooling, and
cookie persistence . * Automatic response body decompression . *
Powerful multipart form and file upload handling . * Support for JSON
requests and responses, including navigation of schema-less responses
. * Basic and OAuth2 bearer authentication . * Early TLS support via
the tls package
A library for client-side HTTP requests, focused on ease of use.
When reading the examples in this module, you should assume the
following environment:
-- Make it easy to write literal ByteString and Text values.
{-# LANGUAGE OverloadedStrings #-}
-- Our handy module.
import Network.Wreq
-- Operators such as (&) and (.~).
import Control.Lens
-- Conversion of Haskell values to JSON.
import Data.Aeson (toJSON)
-- Easy traversal of JSON data.
import Data.Aeson.Lens (key, nth)
There exist some less frequently used lenses that are not exported
from this module; these can be found in
Network.Wreq.Lens.
A lens onto the final request of a historied response.