(defun request (url &key (method :get) headers body store-body header-callback body-callback finish-callback)) => promise
Perform an HTTP request. Returns a promise (to be used withcl-async-future) that is finished when the response has fully downloaded.
url- the URL we're requesting.
method- a keyword method (
:post, etc). Defaults to
headers- a hash table or plist of headers to set with the request. Note that the "Host" header is set automatically (if not proveded) and if the
bodyargument is passed, then "Content-Length" is set as well.
body- A string or byte array to send as the HTTP body. If present, will set the "Content-Length" header automatically in the request.
store-body- If T, will store the entire HTTP response body and finish the returned promise with it once complete. If this is left
nil, then the first value of the finished promise will be
header-callback- A function that is called once the headers from theresponse are fully parsed. The only argument is a hash table of headers.