Safe Haskell | None |
---|
Updated docs to 0.3 # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch gh-pages # Your branch is up-to-date with 'origin/gh-pages'. # # Changes to be committed: # new file: Ketchup-Auth.html # modified: Ketchup-Httpd.html # modified: Ketchup-Routing.html # modified: Ketchup-Utils.html # modified: doc-index.html # modified: index-frames.html # modified: index.html # modified: main.txt # new file: mini_Ketchup-Auth.html # modified: mini_Ketchup-Routing.html # modified: mini_Ketchup-Utils.html # # ------------------------ >8 ------------------------ # Do not touch the line above. # Everything below will be removed. diff --git a/Ketchup-Auth.html b/Ketchup-Auth.html new file mode 100644 index 0000000..ff6a9f5 --- /dev/null +++ b/Ketchup-Auth.html @@ -0,0 +1,8 @@ +
Safe Haskell | None |
---|
Safe Haskell | None |
---|
data HTTPRequest
HTTP Request type +
Safe Haskell | None |
---|
type Headers = Map ByteString [ByteString]
type Handler = Socket → HTTPRequest → IO ()
type Headers = [(ByteString, [ByteString])]
type Handler = Socket → HTTPRequest → IO ()
∷ String | Address to bind (ie. *) |
→ PortNumber | Port to listen on |
→ Handler | Route function to call |
→ IO () |
Listens for incoming HTTP request diff --git a/Ketchup-Routing.html b/Ketchup-Routing.html index c8298c8..6350f4f 100644 --- a/Ketchup-Routing.html +++ b/Ketchup-Routing.html @@ -1,7 +1,7 @@
Safe Haskell | None |
---|
type Route = Socket → HTTPRequest → Parameters → IO ()
type Parameters = Map ByteString ByteString
∷ [(ByteString, Route)] | Routes +
Documentationtype Route = Socket → HTTPRequest → (ByteString → Maybe ByteString) → IO () Router function Takes a list of routes and iterates through them for every requeust useHandler ∷ Handler → Route Wrap a handler in a route diff --git a/Ketchup-Utils.html b/Ketchup-Utils.html index d7b0897..0ef0bb4 100644 --- a/Ketchup-Utils.html +++ b/Ketchup-Utils.html @@ -1,9 +1,9 @@
Documentationtrim ∷ ByteString → ByteString Trim whitespace from headers +
Documentationtrim ∷ ByteString → ByteString Trim whitespace from headers breakBS ∷ ByteString → ByteString → (ByteString, ByteString) ByteString breakSubstring wrapper that drops delimiters - parseBody ∷ ByteString → Map ByteString ByteString Parse a URL-encoded Request + fallback ∷ Maybe a → a → a parseBody ∷ ByteString → [(ByteString, ByteString)] Parse a URL-encoded Request
|