Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runOkapi :: Monad m => (forall a. m a -> IO a) -> Int -> OkapiT m Result -> IO ()
- runOkapiTLS :: Monad m => (forall a. m a -> IO a) -> TLSSettings -> Settings -> OkapiT m Result -> IO ()
- makeOkapiApp :: Monad m => (forall a. m a -> IO a) -> OkapiT m Result -> Application
- get :: forall m. MonadOkapi m => m ()
- post :: forall m. MonadOkapi m => m ()
- head :: forall m. MonadOkapi m => m ()
- put :: forall m. MonadOkapi m => m ()
- delete :: forall m. MonadOkapi m => m ()
- trace :: forall m. MonadOkapi m => m ()
- connect :: forall m. MonadOkapi m => m ()
- options :: forall m. MonadOkapi m => m ()
- patch :: forall m. MonadOkapi m => m ()
- seg :: forall m. MonadOkapi m => Text -> m ()
- segs :: forall m. MonadOkapi m => [Text] -> m ()
- segParam :: forall a m. (MonadOkapi m, FromHttpApiData a) => m a
- segWith :: forall m. MonadOkapi m => (Text -> Bool) -> m ()
- path :: forall m. MonadOkapi m => [Text] -> m ()
- queryParam :: forall a m. (MonadOkapi m, FromHttpApiData a) => Text -> m a
- queryFlag :: forall m. MonadOkapi m => Text -> m Bool
- header :: forall m. MonadOkapi m => HeaderName -> m Text
- auth :: forall m. MonadOkapi m => m Text
- basicAuth :: forall m. MonadOkapi m => m (Text, Text)
- bodyJSON :: forall a m. (MonadOkapi m, FromJSON a) => m a
- bodyForm :: forall a m. (MonadOkapi m, FromForm a) => m a
- okPlainText :: forall m. MonadOkapi m => Headers -> Text -> m Result
- okJSON :: forall a m. (MonadOkapi m, ToJSON a) => Headers -> a -> m Result
- okHTML :: forall m. MonadOkapi m => Headers -> ByteString -> m Result
- okLucid :: forall a m. (MonadOkapi m, ToHtml a) => Headers -> a -> m Result
- connectEventSource :: forall m. MonadOkapi m => EventSource -> m Result
- noContent :: forall a m. MonadOkapi m => Headers -> m Result
- file :: forall m. MonadOkapi m => Natural -> Headers -> FilePath -> m Result
- okFile :: forall m. MonadOkapi m => Headers -> FilePath -> m Result
- skip :: forall a m. MonadOkapi m => m a
- error :: forall a m. MonadOkapi m => Natural -> Headers -> ByteString -> m a
- error500 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a
- error401 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a
- error403 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a
- error404 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a
- error422 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a
- (<!>) :: MonadOkapi m => m a -> m a -> m a
- optionalError :: MonadOkapi m => m a -> m (Maybe a)
- optionError :: MonadOkapi m => a -> m a -> m a
Documentation
runOkapiTLS :: Monad m => (forall a. m a -> IO a) -> TLSSettings -> Settings -> OkapiT m Result -> IO () Source #
makeOkapiApp :: Monad m => (forall a. m a -> IO a) -> OkapiT m Result -> Application Source #
get :: forall m. MonadOkapi m => m () Source #
post :: forall m. MonadOkapi m => m () Source #
head :: forall m. MonadOkapi m => m () Source #
put :: forall m. MonadOkapi m => m () Source #
delete :: forall m. MonadOkapi m => m () Source #
trace :: forall m. MonadOkapi m => m () Source #
connect :: forall m. MonadOkapi m => m () Source #
options :: forall m. MonadOkapi m => m () Source #
patch :: forall m. MonadOkapi m => m () Source #
seg :: forall m. MonadOkapi m => Text -> m () Source #
Parses a single path segment matching the given text and discards it
segs :: forall m. MonadOkapi m => [Text] -> m () Source #
Parses mutiple segments matching the order of the given list and discards them | TODO: Needs testing. May not have the correct behavior
segParam :: forall a m. (MonadOkapi m, FromHttpApiData a) => m a Source #
TODO: Change Read a constraint to custom typeclass or FromHTTPApiData | Parses a single seg segment, and returns the parsed seg segment as a value of the given type
path :: forall m. MonadOkapi m => [Text] -> m () Source #
Matches entire remaining path or fails
queryParam :: forall a m. (MonadOkapi m, FromHttpApiData a) => Text -> m a Source #
Parses a query parameter with the given name and returns the value as the given type
header :: forall m. MonadOkapi m => HeaderName -> m Text Source #
auth :: forall m. MonadOkapi m => m Text Source #
bodyJSON :: forall a m. (MonadOkapi m, FromJSON a) => m a Source #
bodyForm :: forall a m. (MonadOkapi m, FromForm a) => m a Source #
okPlainText :: forall m. MonadOkapi m => Headers -> Text -> m Result Source #
okHTML :: forall m. MonadOkapi m => Headers -> ByteString -> m Result Source #
connectEventSource :: forall m. MonadOkapi m => EventSource -> m Result Source #
skip :: forall a m. MonadOkapi m => m a Source #
error :: forall a m. MonadOkapi m => Natural -> Headers -> ByteString -> m a Source #
error500 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a Source #
error401 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a Source #
error403 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a Source #
error404 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a Source #
error422 :: forall a m. MonadOkapi m => Headers -> ByteString -> m a Source #
(<!>) :: MonadOkapi m => m a -> m a -> m a Source #
Execute the next parser even if the first one throws an Error error
optionalError :: MonadOkapi m => m a -> m (Maybe a) Source #
optionError :: MonadOkapi m => a -> m a -> m a Source #