Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Method
- methodUpper :: Method -> Text
- newtype Host = Host {}
- newtype Port = Port {}
- newtype Tls = Tls {}
- newtype Path = Path {}
- newtype QueryKey = QueryKey {
- unQueryKey :: Text
- newtype QueryValue = QueryValue {
- unQueryValue :: Text
- newtype Body = Body {}
- data Request = Request {}
- class HasRequest c where
Documentation
All standard HTTP methods, mirroring those from Types
, plus a constructor for arbitrary strings.
Instances
Eq Method Source # | |
Show Method Source # | |
IsString Method Source # | |
Defined in Polysemy.Http.Data.Request fromString :: String -> Method # | |
FromJSON Method Source # | |
Defined in Polysemy.Http.Data.Request parseJSON :: Value -> Parser Method parseJSONList :: Value -> Parser [Method] | |
ToJSON Method Source # | |
Defined in Polysemy.Http.Data.Request toEncoding :: Method -> Encoding toJSONList :: [Method] -> Value toEncodingList :: [Method] -> Encoding |
methodUpper :: Method -> Text Source #
Produce the usual uppercase representation of a method.
Request host name.
Instances
Eq Host Source # | |
Show Host Source # | |
IsString Host Source # | |
Defined in Polysemy.Http.Data.Request fromString :: String -> Host # | |
Generic Host Source # | |
FromJSON Host Source # | |
Defined in Polysemy.Http.Data.Request parseJSON :: Value -> Parser Host parseJSONList :: Value -> Parser [Host] | |
ToJSON Host Source # | |
Defined in Polysemy.Http.Data.Request | |
type Rep Host Source # | |
Defined in Polysemy.Http.Data.Request |
Request port.
Instances
Eq Port Source # | |
Show Port Source # | |
Generic Port Source # | |
FromJSON Port Source # | |
Defined in Polysemy.Http.Data.Request parseJSON :: Value -> Parser Port parseJSONList :: Value -> Parser [Port] | |
ToJSON Port Source # | |
Defined in Polysemy.Http.Data.Request | |
type Rep Port Source # | |
Defined in Polysemy.Http.Data.Request |
A flag that indicates whether a request should use TLS.
Instances
Eq Tls Source # | |
Show Tls Source # | |
Generic Tls Source # | |
FromJSON Tls Source # | |
Defined in Polysemy.Http.Data.Request parseJSON :: Value -> Parser Tls parseJSONList :: Value -> Parser [Tls] | |
ToJSON Tls Source # | |
Defined in Polysemy.Http.Data.Request | |
type Rep Tls Source # | |
Defined in Polysemy.Http.Data.Request |
Rrequest path.
Instances
Eq Path Source # | |
Show Path Source # | |
IsString Path Source # | |
Defined in Polysemy.Http.Data.Request fromString :: String -> Path # | |
Generic Path Source # | |
Semigroup Path Source # | |
Monoid Path Source # | |
FromJSON Path Source # | |
Defined in Polysemy.Http.Data.Request parseJSON :: Value -> Parser Path parseJSONList :: Value -> Parser [Path] | |
ToJSON Path Source # | |
Defined in Polysemy.Http.Data.Request | |
type Rep Path Source # | |
Defined in Polysemy.Http.Data.Request |
The key of a query parameter.
Instances
Eq QueryKey Source # | |
Show QueryKey Source # | |
IsString QueryKey Source # | |
Defined in Polysemy.Http.Data.Request fromString :: String -> QueryKey # | |
Generic QueryKey Source # | |
FromJSON QueryKey Source # | |
Defined in Polysemy.Http.Data.Request parseJSON :: Value -> Parser QueryKey parseJSONList :: Value -> Parser [QueryKey] | |
ToJSON QueryKey Source # | |
Defined in Polysemy.Http.Data.Request toEncoding :: QueryKey -> Encoding toJSONList :: [QueryKey] -> Value toEncodingList :: [QueryKey] -> Encoding | |
type Rep QueryKey Source # | |
Defined in Polysemy.Http.Data.Request |
newtype QueryValue Source #
The value of a query parameter.
Instances
Request body, using LByteString
because it is what encode
produces.
Instances
Eq Body Source # | |
Show Body Source # | |
IsString Body Source # | |
Defined in Polysemy.Http.Data.Request fromString :: String -> Body # | |
Generic Body Source # | |
type Rep Body Source # | |
Defined in Polysemy.Http.Data.Request type Rep Body = D1 ('MetaData "Body" "Polysemy.Http.Data.Request" "polysemy-http-0.3.0.0-inplace" 'True) (C1 ('MetaCons "Body" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LByteString))) |
HTTP request parameters, used by Http
.
Instances
class HasRequest c where Source #
request :: Lens' c Request Source #
cookies :: Lens' c CookieJar Source #
headers :: Lens' c [(HeaderName, HeaderValue)] Source #
method :: Lens' c Method Source #
port :: Lens' c (Maybe Port) Source #
Instances
HasRequest Request Source # | |
Defined in Polysemy.Http.Data.Request request :: Lens' Request Request Source # body :: Lens' Request Body Source # cookies :: Lens' Request CookieJar Source # headers :: Lens' Request [(HeaderName, HeaderValue)] Source # host :: Lens' Request Host Source # method :: Lens' Request Method Source # path :: Lens' Request Path Source # port :: Lens' Request (Maybe Port) Source # query :: Lens' Request [(QueryKey, Maybe QueryValue)] Source # |