| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
9年前发布

轻巧,异步HTTP客户端:Carrier

Carrier 是一个轻量级,异步HTTP客户端。构建在 cl-asyncfast-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 the body 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 left nil, then the first value of the finished promise will be nil.
  • 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 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
     转载本站原创文章,请注明出处,并保留原始链接、图片水印。
     本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
     本文地址:https://www.open-open.com/lib/view/open1416207237352.html
    Carrier 网络工具包