From 24e03a15d914c2ee99c5c334333aa6a58fbfee79 Mon Sep 17 00:00:00 2001 From: Hubert Iwaniuk Date: Fri, 27 Apr 2012 18:31:39 +0200 Subject: [PATCH] Documentation update for v0.4.4. --- README.markdown | 17 +++++++++-------- changelog.org | 6 ++++++ docs.org | 16 +++++++--------- index.org | 17 +++++++++-------- setup.org | 2 +- todo.org | 1 + 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/README.markdown b/README.markdown index fdbe037..f909430 100644 --- a/README.markdown +++ b/README.markdown @@ -10,23 +10,24 @@ Declare dependency: ``` clojure (defproject your-project "1.0.0-SNAPSHOT" :description "Your project description" - :dependencies [[org.clojure/clojure "1.3.0"] - [http.async.client "0.4.4-SNAPSHOT"]]) + :dependencies [[org.clojure/clojure "1.4.0"] + [http.async.client "0.4.4"]]) ``` Require: ``` clojure -(ns sample (:require [http.async.client :as c])) +(ns sample (:require [http.async.client :as http])) ``` GET resource: ``` clojure -(with-open [client (c/create-client)] - (let [response (c/GET client "http://neotyk.github.com/http.async.client/")] - (c/await response) - (c/string response))) +(with-open [client (http/create-client)] + (let [response (http/GET client "http://neotyk.github.com/http.async.client/")] + (-> response + http/await + http/string))) ``` ## Information over *http.async.client* @@ -34,7 +35,7 @@ GET resource: [*http.async.client*](http://github.com/neotyk/http.async.client) is based on [Asynchronous Http Client for Java](http://github.com/AsyncHttpClient/async-http-client). -It requires Clojure 1.3, works with 1.4-beta1. +It runs with Clojure 1.3, development goes against Clojure 1.4. For more documentation refer to [docs](http://neotyk.github.com/http.async.client/docs.html) and for diff --git a/changelog.org b/changelog.org index 1b47ca8..79da5d7 100644 --- a/changelog.org +++ b/changelog.org @@ -4,6 +4,12 @@ #+SETUPFILE: setup.org * Release 0.4.4 +** Simplified callbacks API + Issue [[https://github.com/neotyk/http.async.client/issues/32][#32]]. +** Better documented callbacks + This was long outstanding issue [[https://github.com/neotyk/http.async.client/issues/12][#12]]. +** Upgrade [[https://github.com/sonatype/async-http-client][AHC]] to 1.7.4 +** Upgrade Clojure to 1.4 * Release 0.4.3 ** Issue [[https://github.com/neotyk/http.async.client/pull/30][#30]] by [[https://github.com/canassa][Cesar Canassa]] Fixes issue with single cookie in response. diff --git a/docs.org b/docs.org index 35e9843..7cd93fd 100644 --- a/docs.org +++ b/docs.org @@ -10,8 +10,8 @@ #+BEGIN_SRC clojure (defproject your-project "1.0.0-SNAPSHOT" :description "Your project description" - :dependencies [[org.clojure/clojure "1.3.0"] - [http.async.client "0.4.4-SNAPSHOT"]]) + :dependencies [[org.clojure/clojure "1.4.0"] + [http.async.client "0.4.4"]]) #+END_SRC Make sure that your project depends on at least 1.3.0 Clojure as *http.async.client* will not run in earlier versions. @@ -23,13 +23,11 @@ ** GETting To get HTTP resource: #+BEGIN_SRC clojure - (with-open [client (http/create-client)] ;; Create client - ;; request http resource - (let [response (http/GET client "http://github.com/neotyk/http.async.client/")] - ;; wait for response to be received - (http/await response) - ;; read body of response as string - (http/string response))) + (with-open [client (http/create-client)] ; Create client + (let [response (http/GET client "http://github.com/neotyk/http.async.client/")] ; request http resource + (-> response + http/await ; wait for response to be received + http/string))) ; read body of response as string #+END_SRC * Detailed start ** Work modes diff --git a/index.org b/index.org index 6f7c69c..e47b782 100644 --- a/index.org +++ b/index.org @@ -11,28 +11,29 @@ #+BEGIN_SRC clojure (defproject your-project "1.0.0-SNAPSHOT" :description "Your project description" - :dependencies [[org.clojure/clojure "1.3.0"] - [http.async.client "0.4.4-SNAPSHOT"]]) + :dependencies [[org.clojure/clojure "1.4.0"] + [http.async.client "0.4.4"]]) #+END_SRC Require: #+BEGIN_SRC clojure - (ns sample (:require [http.async.client :as c])) + (ns sample (:require [http.async.client :as http])) #+END_SRC GET resource: #+BEGIN_SRC clojure - (with-open [client (c/create-client)] - (let [response (c/GET client "http://github.com/neotyk/http.async.client/")] - (c/await response) - (c/string response))) + (with-open [client (http/create-client)] + (let [response (http/GET client "http://github.com/neotyk/http.async.client/")] + (-> response + http/await + http/string))) #+END_SRC * More info [[http://github.com/neotyk/http.async.client][*http.async.client*]] is based on [[http://github.com/AsyncHttpClient/async-http-client][Asynchronous Http Client for Java]]. - It requires Clojure 1.3, works with 1.4-beta1. + It runs with Clojure 1.3, development goes against Clojure 1.4. For more documentation refer to [[./docs.org][docs]] and for API to [[http://neotyk.github.com/http.async.client/doc/][doc]]. diff --git a/setup.org b/setup.org index 4d0ac39..f09e4b3 100644 --- a/setup.org +++ b/setup.org @@ -1,5 +1,5 @@ #+INFOJS_OPT: path:org-info.js -#+INFOJS_OPT: view:showall toc:t ftoc:t ltoc:above tdepth:2 sdepth:4 mouse:underline buttons:t +#+INFOJS_OPT: view:showall toc:t ftoc:t ltoc:above tdepth:2 sdepth:3 mouse:underline buttons:t #+INFOJS_OPT: up:http://neotyk.github.com/http.async.client/ #+INFOJS_OPT: home:http://neotyk.github.com #+STYLE: diff --git a/todo.org b/todo.org index c14f373..ed03df4 100644 --- a/todo.org +++ b/todo.org @@ -36,6 +36,7 @@ AHC, or alternatively will *clojure.core/send-off* to execute IO operation in separate thread. ** TODO Multipart :rel4: +** TODO Request queuing ** DONE Authentication :rel3: *** DONE Test Authentication * Configuration [2/2]