JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

spork/http/server-handler

spork


    function
    /usr/local/lib/janet/spork/http.janet on line 414, column 1

    (server-handler conn handler)

    A simple connection handler for an HTTP server. When a connection 
    is accepted. Call this with a handler function to handle the 
    connect. The handler will be called with one argument, the request 
    table, which will contain the following keys:

    * `:head-size` - number of bytes in the http header.
    * `:headers` - table mapping header names to header values.
    * `:connection` - the connection stream for the header.
    * `:buffer` - the buffer instance that may contain extra bytes.
    * `:path` - HTTP path.
    * `:method` - HTTP method, as a string.


0 examplesSign in to add an example
Loading...