Skip to content

Commit

Permalink
Documentation update for v0.4.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
neotyk committed Apr 27, 2012
1 parent fc21a99 commit 24e03a1
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 26 deletions.
17 changes: 9 additions & 8 deletions README.markdown
Expand Up @@ -10,31 +10,32 @@ 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*

[*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
Expand Down
6 changes: 6 additions & 0 deletions changelog.org
Expand Up @@ -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.
Expand Down
16 changes: 7 additions & 9 deletions docs.org
Expand Up @@ -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.
Expand All @@ -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
Expand Down
17 changes: 9 additions & 8 deletions index.org
Expand Up @@ -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]].

Expand Down
2 changes: 1 addition & 1 deletion 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: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
Expand Down
1 change: 1 addition & 0 deletions todo.org
Expand Up @@ -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]
Expand Down

0 comments on commit 24e03a1

Please sign in to comment.