| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
UI
Contents
Description
Top-level Brick application wiring for RESTman.
mkInitialState builds the initial AppS from the values parsed on the command line.
startUI creates the HTTP manager, optionally performs an initial request when a URI is
supplied, and hands control to the Brick main loop.
The Brick App record is assembled here; the individual draw, event-handling, and cursor
functions live in Lib.
Synopsis
- mkInitialState :: Manager -> String -> UseDefaultHeaders -> [Header] -> Maybe ByteString -> Maybe Text -> AppS
- startUI :: String -> UseDefaultHeaders -> [Header] -> Maybe ByteString -> Maybe Text -> IO ()
Application entry points
Arguments
| :: Manager | HTTP connection manager |
| -> String | Initial HTTP method |
| -> UseDefaultHeaders | How to handle default headers |
| -> [Header] | Additional or replacement headers |
| -> Maybe ByteString | Payload or Nothing |
| -> Maybe Text | URI or Nothing |
| -> AppS |
Build the initial AppS from command-line arguments and an HTTP manager.
Arguments
| :: String | Initial HTTP method |
| -> UseDefaultHeaders | how to handle default headers |
| -> [Header] | additional or replacement headers |
| -> Maybe ByteString | payload or Nothing |
| -> Maybe Text | uri or Nothing |
| -> IO () |
Launch the RESTman TUI.
Creates a new HTTP Manager using robustSettings, builds the initial AppS via
mkInitialState, and — if a URI was supplied — fires an initial request before entering
the Brick event loop.