JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

spork/http/read-response

spork


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

    (read-response conn buf)

    Read an HTTP response header from a connection. Returns a table 
    with the following keys:

    * `:headers` - table mapping header names to header values. Header 
      names are lowercase.
    * `:connection` - the connection stream for the header.
    * `:buffer` - the buffer instance that may contain extra bytes.
    * `:head-size` - the number of bytes used by the header.
    * `:status` - the HTTP status code.
    * `:message` - the HTTP status message.

    Note that data is read in chunks and any data after the header 
    terminator is stored in `:buffer`.


0 examplesSign in to add an example
Loading...