This is the http-parse Reference Manual, version 0.1.10, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 05:27:46 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
http-parse
A library for parsing HTTP requests/responses (synchronous or asynchronous).
Andrew Danger Lyon <orthecreedence@gmail.com>
MIT
0.1.10
babel
(system).
cl-ppcre
(system).
package.lisp
(file).
util.lisp
(file).
parse.lisp
(file).
multipart-parse.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
http-parse/http-parse.asd
http-parse/package.lisp
http-parse/util.lisp
http-parse/parse.lisp
http-parse/multipart-parse.lisp
http-parse/util.lisp
package.lisp
(file).
http-parse
(system).
append-array
(function).
find-non-whitespace-pos
(function).
http-parse/parse.lisp
util.lisp
(file).
http-parse
(system).
http
(class).
http-body
(reader method).
(setf http-body)
(writer method).
http-force-stream
(reader method).
(setf http-force-stream)
(writer method).
http-headers
(reader method).
(setf http-headers)
(writer method).
http-method
(reader method).
(setf http-method)
(writer method).
http-request
(class).
http-resource
(reader method).
(setf http-resource)
(writer method).
http-response
(class).
http-status
(reader method).
(setf http-status)
(writer method).
http-status-text
(reader method).
(setf http-status-text)
(writer method).
http-store-body
(reader method).
(setf http-store-body)
(writer method).
http-version
(reader method).
(setf http-version)
(writer method).
make-parser
(function).
print-object
(method).
print-object
(method).
print-object
(method).
*scanner-find-first-header*
(special variable).
*scanner-header-parse-kv*
(special variable).
*scanner-header-parse-line*
(special variable).
*scanner-numeric*
(special variable).
convert-headers-plist
(function).
get-complete-chunks
(function).
get-header-block
(function).
parse-headers
(generic function).
http-parse/multipart-parse.lisp
util.lisp
(file).
http-parse
(system).
make-multipart-parser
(function).
*scanner-content-disposition-kv-pairs*
(special variable).
get-header-kv-pairs
(function).
Packages are listed by definition order.
http-parse
common-lisp
.
http
(class).
http-body
(generic reader).
(setf http-body)
(generic writer).
http-force-stream
(generic reader).
(setf http-force-stream)
(generic writer).
http-headers
(generic reader).
(setf http-headers)
(generic writer).
http-method
(generic reader).
(setf http-method)
(generic writer).
http-request
(class).
http-resource
(generic reader).
(setf http-resource)
(generic writer).
http-response
(class).
http-status
(generic reader).
(setf http-status)
(generic writer).
http-status-text
(generic reader).
(setf http-status-text)
(generic writer).
http-store-body
(generic reader).
(setf http-store-body)
(generic writer).
http-version
(generic reader).
(setf http-version)
(generic writer).
make-multipart-parser
(function).
make-parser
(function).
*scanner-content-disposition-kv-pairs*
(special variable).
*scanner-find-first-header*
(special variable).
*scanner-header-parse-kv*
(special variable).
*scanner-header-parse-line*
(special variable).
*scanner-numeric*
(special variable).
append-array
(function).
convert-headers-plist
(function).
find-non-whitespace-pos
(function).
get-complete-chunks
(function).
get-header-block
(function).
get-header-kv-pairs
(function).
parse-headers
(generic function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Make a multipart parser. Returns a closure that accepts a byte array of data from an HTTP body. Can be sent in in chunks. Callback will be called whenever a complete data chunk is sent in (called for each part in the data chunk) or as a continuation of a chunk that complete headers were sent in for but didn’t finish sending in its body.
Return a closure that parses an HTTP request/response by calling it with
the bytes received as its only argument. The closure returns three values:
the http object passed in, a boolean representing whether the headers have
been fully parsed, and a boolean representing whether the request/response
is finished (blank body, all body bytes accounted for, or 0-length chunk
received).
During the parsing, the closure will call (if specified) the ‘header-callback‘
with all the headers as a plist once they are fully parsed, and the
‘body-callback‘ with the body once either it finishes parsing (if we have
Content-Length) or once for each set of completed chunks sent, which allows
streaming the body as it comes in. If a multipart callback is given, it will
be called at least once for each form field present in the multipart form
data.
The ‘:finish-callback‘ will be called when the HTTP payload is fully
processed.
The :store-body keyword indicates to the parser that we wish to keep the
body (in its entirety) in the http object passed in (accessible via the
http-body accessor). Otherwise, the body will be discarded as it’s parsed
(but remember, will still be sent to the body-callback as it comes in).
Parsing can be forced to completion by passing :EOF into the data arg. It
is recommended to do this if the client/server closes the connection before
you do.
http-request
)) ¶automatically generated reader method
http-request
)) ¶automatically generated writer method
http-request
)) ¶automatically generated reader method
http-request
)) ¶automatically generated writer method
http-response
)) ¶automatically generated reader method
http-response
)) ¶automatically generated writer method
http-response
)) ¶automatically generated reader method
http-response
)) ¶automatically generated writer method
http-request
) s) ¶http-response
) s) ¶Base HTTP class, holds data common to both requests and responses.
1
:version
:headers
:store-body
:force-stream
(make-array 0 :element-type (quote (unsigned-byte 8)))
:body
HTTP request class, extends ‘http‘ and holds all request-specific data.
HTTP response class, extends ‘http‘ and holds all response-specific data.
Grabs the key/value pairs from a Content-Disposition header.
Create a scanner to find the first header in a string.
Create a regex scanner for splitting header kv pairs up.
Create a regex scanner for splitting header lines up.
Create a regex scanner that detects if a string can be converted to a numver.
Create an array, made up of arr1 followed by arr2.
Pull out headers in a plist from a string.
Find the position of the first non-whitespace character in a sequence.
Given a chunk (octet vector) of HTTP data, return only the data from the *complete* chunks in the data and return the position in the byte vector of the start of the next chunk, and lastly return whether the last chunk (the 0-byte chunk) has been parsed (ie, HTTP body complete).
Given the bytes of an HTTP request/response, pull out only the headers and optionally the line above the start of the headers. Returns the headers as a string.
Given a content-disposition header value, pull out the key/value pairs in it.
Given a slew of HTTP bytes, parse the headers out of them along with any other useful information lurking in there (status code, resource, etc). Returns the HTTP object passed in.
http-response
) (bytes vector
)) ¶http-request
) (bytes vector
)) ¶Jump to: | (
A C F G H M P |
---|
Jump to: | (
A C F G H M P |
---|
Jump to: | *
B F H M R S V |
---|
Jump to: | *
B F H M R S V |
---|
Jump to: | C F H M P S U |
---|
Jump to: | C F H M P S U |
---|