轻巧,异步HTTP客户端:Carrier
Carrier 是一个轻量级,异步HTTP客户端。构建在 cl-async 和 fast-http 之上。
其目的是通过HTTP实现简单和高效的流数据。它与drakma-async类似。request (function)
(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 (:get
,:post
, etc). Defaults to:get
.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 thebody
argument 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 leftnil
, then the first value of the finished promise will benil
.header-callback
- A function that is called once the headers from theresponse are fully parsed. The only argument is a hash table of headers.
项目主页:http://www.open-open.com/lib/view/home/1416207237352
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!