polysemy-http-0.5.0.0: Polysemy Effects for HTTP clients
Safe HaskellNone
LanguageHaskell2010

Polysemy.Http.Data.Request

Description

 
Synopsis

Documentation

data Method Source #

All standard HTTP methods, mirroring those from Types, plus a constructor for arbitrary strings.

Instances

Instances details
Eq Method Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Show Method Source # 
Instance details

Defined in Polysemy.Http.Data.Request

IsString Method Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

fromString :: String -> Method #

ToJSON Method Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON Method Source # 
Instance details

Defined in Polysemy.Http.Data.Request

methodUpper :: Method -> Text Source #

Produce the usual uppercase representation of a method.

newtype Host Source #

Request host name.

Constructors

Host 

Fields

Instances

Instances details
Eq Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Host -> Host -> Bool #

(/=) :: Host -> Host -> Bool #

Show Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

showsPrec :: Int -> Host -> ShowS #

show :: Host -> String #

showList :: [Host] -> ShowS #

IsString Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

fromString :: String -> Host #

Generic Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep Host :: Type -> Type #

Methods

from :: Host -> Rep Host x #

to :: Rep Host x -> Host #

ToJSON Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Host Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Host = D1 ('MetaData "Host" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "Host" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype Port Source #

Request port.

Constructors

Port 

Fields

Instances

Instances details
Enum Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

succ :: Port -> Port #

pred :: Port -> Port #

toEnum :: Int -> Port #

fromEnum :: Port -> Int #

enumFrom :: Port -> [Port] #

enumFromThen :: Port -> Port -> [Port] #

enumFromTo :: Port -> Port -> [Port] #

enumFromThenTo :: Port -> Port -> Port -> [Port] #

Eq Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Port -> Port -> Bool #

(/=) :: Port -> Port -> Bool #

Integral Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

quot :: Port -> Port -> Port #

rem :: Port -> Port -> Port #

div :: Port -> Port -> Port #

mod :: Port -> Port -> Port #

quotRem :: Port -> Port -> (Port, Port) #

divMod :: Port -> Port -> (Port, Port) #

toInteger :: Port -> Integer #

Num Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(+) :: Port -> Port -> Port #

(-) :: Port -> Port -> Port #

(*) :: Port -> Port -> Port #

negate :: Port -> Port #

abs :: Port -> Port #

signum :: Port -> Port #

fromInteger :: Integer -> Port #

Ord Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

compare :: Port -> Port -> Ordering #

(<) :: Port -> Port -> Bool #

(<=) :: Port -> Port -> Bool #

(>) :: Port -> Port -> Bool #

(>=) :: Port -> Port -> Bool #

max :: Port -> Port -> Port #

min :: Port -> Port -> Port #

Read Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Real Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

toRational :: Port -> Rational #

Show Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

showsPrec :: Int -> Port -> ShowS #

show :: Port -> String #

showList :: [Port] -> ShowS #

Generic Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep Port :: Type -> Type #

Methods

from :: Port -> Rep Port x #

to :: Rep Port x -> Port #

ToJSON Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Port Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Port = D1 ('MetaData "Port" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "Port" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

newtype Tls Source #

A flag that indicates whether a request should use TLS.

Constructors

Tls 

Fields

Instances

Instances details
Eq Tls Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Tls -> Tls -> Bool #

(/=) :: Tls -> Tls -> Bool #

Show Tls Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

showsPrec :: Int -> Tls -> ShowS #

show :: Tls -> String #

showList :: [Tls] -> ShowS #

Generic Tls Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep Tls :: Type -> Type #

Methods

from :: Tls -> Rep Tls x #

to :: Rep Tls x -> Tls #

ToJSON Tls Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON Tls Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Tls Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Tls = D1 ('MetaData "Tls" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "Tls" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

newtype Path Source #

Rrequest path.

Constructors

Path 

Fields

Instances

Instances details
Eq Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

Show Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

IsString Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

fromString :: String -> Path #

Generic Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep Path :: Type -> Type #

Methods

from :: Path -> Rep Path x #

to :: Rep Path x -> Path #

Semigroup Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(<>) :: Path -> Path -> Path #

sconcat :: NonEmpty Path -> Path #

stimes :: Integral b => b -> Path -> Path #

Monoid Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

mempty :: Path #

mappend :: Path -> Path -> Path #

mconcat :: [Path] -> Path #

ToJSON Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Path Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Path = D1 ('MetaData "Path" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "Path" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype QueryKey Source #

The key of a query parameter.

Constructors

QueryKey 

Fields

Instances

Instances details
Eq QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Show QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

IsString QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Generic QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep QueryKey :: Type -> Type #

Methods

from :: QueryKey -> Rep QueryKey x #

to :: Rep QueryKey x -> QueryKey #

ToJSON QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep QueryKey Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep QueryKey = D1 ('MetaData "QueryKey" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "QueryKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unQueryKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype QueryValue Source #

The value of a query parameter.

Constructors

QueryValue 

Fields

Instances

Instances details
Eq QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Show QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

IsString QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Generic QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep QueryValue :: Type -> Type #

ToJSON QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

FromJSON QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep QueryValue Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep QueryValue = D1 ('MetaData "QueryValue" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "QueryValue" 'PrefixI 'True) (S1 ('MetaSel ('Just "unQueryValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype Body Source #

Request body, using LByteString because it is what encode produces.

Constructors

Body 

Fields

Instances

Instances details
Eq Body Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Body -> Body -> Bool #

(/=) :: Body -> Body -> Bool #

Show Body Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

IsString Body Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

fromString :: String -> Body #

Generic Body Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep Body :: Type -> Type #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

type Rep Body Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Body = D1 ('MetaData "Body" "Polysemy.Http.Data.Request" "polysemy-http-0.5.0.0-inplace" 'True) (C1 ('MetaCons "Body" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LByteString)))

data Request Source #

HTTP request parameters, used by Http.

Instances

Instances details
Eq Request Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Methods

(==) :: Request -> Request -> Bool #

(/=) :: Request -> Request -> Bool #

Show Request Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Generic Request Source # 
Instance details

Defined in Polysemy.Http.Data.Request

Associated Types

type Rep Request :: Type -> Type #

Methods

from :: Request -> Rep Request x #

to :: Rep Request x -> Request #

HasRequest Request Source # 
Instance details

Defined in Polysemy.Http.Data.Request

type Rep Request Source # 
Instance details

Defined in Polysemy.Http.Data.Request