headroom-0.4.2.0: License Header Manager
Copyright(c) 2019-2021 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.IO.Network

Description

Module providing support to perform selected network IO operations, such as downloading file content, etc.

Synopsis

Type Aliases

type DownloadContentFn m Source #

Arguments

 = URI

URI of remote resource

-> m Text

downloaded content

Type of a function that returns content of remote resource.

Polymorphic Record

data Network m Source #

Polymorphic record of functions performing network IO operations.

Constructors

Network 

Fields

mkNetwork :: MonadIO m => Network m Source #

Constructs new Network that performs real network IO operations.

Network IO operations

downloadContent Source #

Arguments

:: MonadIO m 
=> URI

URI of remote resource

-> m Text

downloaded content

Downloads content of remote resource as Text. Note that only http and https is supported at this moment.