Permalink
Browse files

More documentation update.

  • Loading branch information...
1 parent 3b6a9b8 commit aad1098c8e377fede2ac12fb05dc8d9f5cf8c9c3 @neotyk neotyk committed Sep 7, 2010
Showing with 19 additions and 18 deletions.
  1. +1 −1 README.org
  2. +12 −12 docs.org
  3. +3 −3 project.clj
  4. +3 −2 todo.org
View
@@ -13,7 +13,7 @@
:description "Your project description"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
- [http.async "2.0.0"]])
+ [http.async.client "2.0.0"]])
#+END_SRC
Require:
View
@@ -16,7 +16,7 @@
:description "Your project description"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
- [http.async.client "2.0.0"]])
+ [http.async.client "0.2.0"]])
#+END_SRC
Make sure that your project depends on 1.2 Clojure as *http.async.client*
will not run in earlier versions.
@@ -28,7 +28,7 @@
*** GETting
To get HTTP resource:
#+BEGIN_SRC clojure
- (let [r (c/GET "http://github.com/neotyk/http.async/")]
+ (let [r (c/GET "http://github.com/neotyk/http.async.client/")]
(c/await r)
(c/string r))
#+END_SRC
@@ -368,7 +368,7 @@
you actually asynchronously execute HTTP request.
Some times you might need to wait for response processing to be
done before proceeding, in order to do so you call
- *http.async.client/await*.
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/await][*http.async.client/await*]].
It takes only one argument, that is response and returns once
receiving has finished.
#+BEGIN_SRC clojure
@@ -383,7 +383,7 @@
(c/string (c/await resp)))
#+END_SRC
**** Reading status line
- *http.async.client/status* returns status lazy map of response.
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/status][*http.async.client/status*]] returns status lazy map of response.
It will wait until HTTP Status has been received.
#+BEGIN_SRC clojure
(let [resp (c/GET url)
@@ -394,7 +394,7 @@
after this returns headers and body, might not been delivered
yet.
**** Reading headers
- *http.async.client/headers* returns headers lazy map of response.
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/headers][*http.async.client/headers*]] returns headers lazy map of response.
It will wait until HTTP Headers are received.
#+BEGIN_SRC clojure
(let [resp (c/GET url)
@@ -404,7 +404,7 @@
Again, like in case of status, body might not have been delivered
yet after this returns.
**** Reading cookies
- *http.async.client/cookies* returns seq of maps representing
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/cookies][*http.async.client/cookies*]] returns seq of maps representing
cookies.
It will wait until HTTP Headers are received.
#+BEGIN_SRC clojure
@@ -415,7 +415,7 @@
Sample above will return sequence of cookie names that server has
set.
**** Reading body
- *http.async.client/body* returns either ByteArrayOutputStream or
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/body][*http.async.client/body*]] returns either ByteArrayOutputStream or
seq of it, depending if you used [[*Asynchronous%20operations][Asynchronous operations]] or
[[*Streaming][Streaming]] respectively.
It will *not* wait for response to be finished, it will return as
@@ -470,10 +470,10 @@
*** *http.async.client* configuration
**** Branding
*http.async.client* con be configured, for now only with
- User-Agent. To do so you use *http.async.client/create-client*.
+ User-Agent. To do so you use [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/create-client][*http.async.client/create-client*]].
It takes map of options, for now it only accepts *:user-agent*.
Once you've created client you need to use it via
- *http.async.client/with-ahc*..
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/with-ahc][*http.async.client/with-ahc*]].
#+BEGIN_SRC clojure
(c/with-ahc {:user-agent "Your User Agent/1.0"}
(let [resp (GET url)]
@@ -551,9 +551,9 @@
- response map
- *Throwable* that was a cause of failure
**** Default set of callbacks
- *http.async.client.request/*default-callbacks** is a map of
+ [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client.request/*default-callbacks*][*http.async.client.request/*default-callbacks**]] is a map of
default callbacks. This fill allow you to easy change only few
callbacks and reuse default for the rest.
- Please see source of *http.async.client/stream-seq* to see how to
- do it.
+ Please look at source of [[http://neotyk.github.com/ahc-clj/autodoc/http.async.client-api.html#http.async.client/stream-seq][*http.async.client/stream-seq*]] to see
+ how to do it.
View
@@ -9,7 +9,7 @@
[org.clojars.neotyk/lein-javac "1.0.1"]
[lein-difftest "1.2.2"]
[org.eclipse.jetty/jetty-server "7.1.4.v20100610"]]
- :autodoc {:name "ahc-clj"
- :web-src-dir "http://github.com/neotyk/ahc-clj/blob/"
- :web-home "http://neotyk.github.com/ahc-clj/autodoc/"
+ :autodoc {:name "http.async.client"
+ :web-src-dir "http://github.com/neotyk/http.async.client/blob/"
+ :web-home "http://neotyk.github.com/http.async.client/autodoc/"
:copyright "Copyright 2010 Hubert Iwaniuk"})
View
@@ -1,4 +1,4 @@
-#+TITLE: Async Http Client - Clojure - To Do
+#+TITLE: Asynchronous HTTP Client - Clojure - To Do
#+AUTHOR: Hubert Iwaniuk
#+EMAIL: neotyk@kungfoo.pl
#+INFOJS_OPT: view:info toc:1
@@ -47,7 +47,7 @@
** TODO Per request configuration [1/2] :rel4:
*** DONE Proxy configuration :rel3:
*** TODO Timeout :rel4:
-* Tasks [9/10]
+* Tasks [9/11]
** DONE License :rel1:
** DONE Cleanup namespaces :rel1:
*** async.http.client
@@ -81,3 +81,4 @@
- Use new checkable *promise* for different parts of response
- Use normal map for response instead of (ref {})
- Provide helper functions to deal with metadata on response
+** TODO Rename to *http.async.client* :rel3:

0 comments on commit aad1098

Please sign in to comment.