CrossClj

1.1.44 docs

SourceDocs



RECENT
    VARS
    charset
    content-type
    get-host-origin
    handler
    href-for
    language
    listener
    path-for
    redirect
    request-for
    resource
    response-for
    routes
    safe-relative-file
    safe-relative-path
    scheme-for
    server
    swaggered
    uri-info
    url-for
    yada

    « Index of all namespaces of this project

    (charset ctx)
    (content-type ctx)
    (get-host-origin req)
    (handler resource)
    Create a Ring handler
    
    (language ctx)
    (listener routes & [aleph-options])
    Start an HTTP listener on a given port. If not specified, listener
    will be started on any available port. Returns {:port port :close fn}
    (redirect target)(redirect target opts)
    Opts can include route-params, query-params and vhost
    
    (request-for method uri options)
    (resource model)
    (response-for o)(response-for o method)(response-for o method uri)(response-for o method uri options)
    Produces yada responses for a number of types. Maps are interpreted
    as resource-maps, vectors are bidi routes. If you want these as
    bodies, use (response-for {:response …})
    (routes routes & [{:keys [pre post], :or {pre identity, post identity}}])
    Process a route structure, interpretting any 'naked' maps in the
    Matched position as resource-models and converting them into
    resources. A pre-processing function can be provided that will be
    called on each naked map prior to the map being turned into a
    resource (with consequent schema checking). A post-processing
    function can also be provided that will post-process the actual
    resource records, after the schema check.
    (safe-relative-file parent path)
    (safe-relative-path parent path)
    Given a parent java.nio.file.Path, return a child that is
    guaranteed not to ascend the parent. This is to ensure access cannot
    be made to files outside of the parent root.
    (swaggered routes & [template])
    (uri-info ctx handler & [options])