| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Polysemy.Http.Data.Request
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 Methods fromString :: String -> Method # | |
| FromJSON Method Source # | |
Defined in Polysemy.Http.Data.Request | |
| ToJSON Method Source # | |
Defined in Polysemy.Http.Data.Request Methods 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 Methods fromString :: String -> Host # | |
| Generic Host Source # | |
| FromJSON Host Source # | |
Defined in Polysemy.Http.Data.Request | |
| ToJSON Host Source # | |
Defined in Polysemy.Http.Data.Request Methods toEncoding :: Host -> Encoding toJSONList :: [Host] -> Value toEncodingList :: [Host] -> Encoding | |
| 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 | |
| ToJSON Port Source # | |
Defined in Polysemy.Http.Data.Request Methods toEncoding :: Port -> Encoding toJSONList :: [Port] -> Value toEncodingList :: [Port] -> Encoding | |
| 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 | |
| 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 Methods fromString :: String -> Path # | |
| Generic Path Source # | |
| Semigroup Path Source # | |
| Monoid Path Source # | |
| FromJSON Path Source # | |
Defined in Polysemy.Http.Data.Request | |
| ToJSON Path Source # | |
Defined in Polysemy.Http.Data.Request Methods toEncoding :: Path -> Encoding toJSONList :: [Path] -> Value toEncodingList :: [Path] -> Encoding | |
| type Rep Path Source # | |
Defined in Polysemy.Http.Data.Request | |
The key of a query parameter.
Constructors
| QueryKey | |
Fields
| |
Instances
| Eq QueryKey Source # | |
| Show QueryKey Source # | |
| IsString QueryKey Source # | |
Defined in Polysemy.Http.Data.Request Methods fromString :: String -> QueryKey # | |
| Generic QueryKey Source # | |
| FromJSON QueryKey Source # | |
Defined in Polysemy.Http.Data.Request | |
| ToJSON QueryKey Source # | |
Defined in Polysemy.Http.Data.Request Methods 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.
Constructors
| QueryValue | |
Fields
| |
Instances
Request body, using LByteString because it is what encode produces.
Constructors
| Body | |
Fields | |
Instances
| Eq Body Source # | |
| Show Body Source # | |
| IsString Body Source # | |
Defined in Polysemy.Http.Data.Request Methods 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.2.0.2-inplace" 'True) (C1 ('MetaCons "Body" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LByteString))) | |
HTTP request parameters, used by Http.
Constructors
| Request | |
Instances
class HasRequest c where Source #
Minimal complete definition
Methods
request :: Lens' c Request 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 Methods request :: Lens' Request Request Source # body :: Lens' Request Body 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 # | |