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.
methodUpper :: Method -> Text Source #
Produce the usual uppercase representation of a method.
Request host name.
Instances
Request port.
A flag that indicates whether a request should use TLS.
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 # | |
ToJSON Path Source # | |
Defined in Polysemy.Http.Data.Request | |
FromJSON Path Source # | |
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 # | |
ToJSON QueryKey Source # | |
Defined in Polysemy.Http.Data.Request | |
FromJSON QueryKey Source # | |
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.4.0.5-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 # |