úÎV|QS(      !"#$%&' Safe-Infered ()*+,-./01 ()*+,-./0(+*),-./01None$0 = silent, 1(def) = startup banner Warp 2 "3456789:;<=>?@ABCDEFGHIJKL3456789:;<=>?@ABCDEFGH5436789:;<=@?>ABCDEFGHIJKL Safe-Infered -Throw an exception, which can be caught with  . Uncaught exceptions  turn into HTTP 500 responses. EAbort execution of this action and continue pattern matching routes. # Like an exception, any code after   is not executed. JAs an example, these two routes overlap. The only way the second one will $ ever run is if the first one calls  .  get "/foo/:number" $ do  n <- param "number" ! unless (all isDigit n) $ next  text "a number"   get "/foo/:bar" $ do  bar <- param "bar"  text "not a number" Catch an exception thrown by  . 2 raise "just kidding" `rescue` (\msg -> text msg) cRedirect to given URL. Like throwing an uncatchable exception. Any code after the call to redirect  will not be run.  " redirect "http://www.google.com" OR  redirect "/foo/bar" Get the M object. Get the request body. eParse the request body as a JSON object and return it. Raises an exception if parse is unsuccessful. QGet a parameter. First looks in captures, then form data, then query parameters. , Raises an exception which can be caught by   if parameter is not found.  If parameter is found, but N% fails to parse to the correct type,   is called. > This means captures are somewhat typed, in that a route won't match if a correctly typed  capture cannot be parsed. .Set the HTTP response status. Default is 200. YSet one of the response headers. Will override any previously set value for that header. $ Header names are case-insensitive. *Set the body of the response to the given O value. Also sets " Content-Type"  header to "text/plain". *Set the body of the response to the given O value. Also sets " Content-Type"  header to "text/html". "Send a file as the response. Doesn' t set the " Content-Type" header, so you probably " want to do that on your own with . PSet the body of the response to the JSON encoding of the given value. Also sets " Content-Type"  header to " application/json". /Set the body of the response to a Source. Doesn' t set the  " Content-Type"1 header, so you probably want to do that on your  own with . P QRSTUVWXYZP P QRSTUVWXYZ Safe-Infered ;An action (executed when a route matches) can either be an  computation, or I a function with an argument for each capture in the route. For example:  ' get "/lambda/:foo/:bar" $ \ a b -> do  text $ mconcat [a,b] is elaborated by Scotty to:  get "/lambda/:foo/:bar" $ do  a <- param "foo"  b <- param "bar"  text $ mconcat [a,b] get =  [ post =  \ put =  ]  delete =  ^ 6Add a route that matches regardless of the HTTP verb. QSpecify an action to take if nothing else is found. Note: this _always_ matches, 2 so should generally be the last route specified. Define a route with a _, O# value representing the path spec,  and a body () which modifies the response.  ' addroute GET "/" $ text "beam me up!" NThe path spec can include values starting with a colon, which are interpreted  as captures7. These are named wildcards that can be looked up with .   addroute GET "/foo/:bar" $ do  v <- param "bar"  text v (curl http://localhost:3000/foo/something something +Match requests using a regular expression. ) Named captures are not yet supported.   get (regex "^/f(.*)r$") $ do  path <- param "0"  cap <- param "1" 8 text $ mconcat ["Path: ", path, "\nCapture: ", cap] "curl http://localhost:3000/foo/barPath: /foo/barCapture: oo/ba!HStandard Sinatra-style route. Named captures are prepended with colons. M This is the default route type generated by OverloadedString routes. i.e.  ! get (capture "/foo/:bar") $ ... and  $ {-# LANGUAGE OverloadedStrings #-}  ...  get "/foo/:bar" $ ... are equivalent. "CBuild a route based on a function which can match using the entire M object.  `' indicates the route does not match. A a value indicates Q a successful match, optionally returning a list of key-value pairs accessible  by .  S get (function $ \req -> Just [("version", T.pack $ show $ httpVersion req)]) $ do  v <- param "version"  text v curl http://localhost:3000/HTTP/1.1#PBuild a route that requires the requested path match exactly, without captures.  !"#bc  !"# !"#bc Safe-Infered$0Run a scotty application using the warp server. %GRun a scotty application using the warp server, passing extra options. &%Turn a scotty application into a WAI d, which can be  run with any WAI handler. 'HUse given middleware. Middleware is nested such that the first declared O is the outermost middleware (it has first dibs on the request and last action < on the response). Every middleware is run on each request. $%&'(  !"#$%&'($&%'! "#   $%&'e       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEDFGHIIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghfgifgjfgkfglUmnUmopqRSrs scotty-0.4.3 Web.ScottyWeb.Scotty.UtilWeb.Scotty.TypesWeb.Scotty.ActionWeb.Scotty.Route RoutePatternActionMParamScottyMOptionsverbosesettingsParsableraisenextrescueredirectrequestbodyjsonDataparamstatusheadertexthtmlfilejsonsourceActiongetpostputdeletematchAnynotFoundaddrouteregexcapturefunctionliteralscotty scottyOpts scottyApp middlewareContent ContentSource ContentFileContentBuilderlazyTextToStrictByteStringstrictByteStringToLazyText setContent setHeader setStatus$fDefaultResponse warp-1.2.1.1Network.Wai.Handler.WarpSettingsFunctionLiteralCaptureAMrunAM ActionEnvEnvgetReq getParamsgetBody ActionErrorNextRedirectSrunS ScottyState middlewaresroutes addMiddlewareaddRoute$fIsStringRoutePattern$fErrorActionError$fDefaultScottyState$fDefaultOptions wai-1.2.0.2 Network.WaiRequestbase Text.Readread text-0.11.2.1Data.Text.Lazy.InternalText runAction$fParsableInteger $fParsableInt$fParsableFloat$fParsableDouble$fParsableBool $fParsable[] $fParsable()$fParsableChar$fParsableByteString$fParsableTexthttp-types-0.6.11Network.HTTP.TypesGETPOSTPUTDELETE StdMethod Data.MaybeNothingJust $fAction(->)$fActionActionM Application