diff options
-rw-r--r-- | api-index.html | 3 | ||||
-rw-r--r-- | api-index.json | 58 | ||||
-rw-r--r-- | http.agent-api.html | 82 | ||||
-rw-r--r-- | index.html | 2 |
4 files changed, 104 insertions, 41 deletions
diff --git a/api-index.html b/api-index.html index 05f3a94a..4e0a11fd 100644 --- a/api-index.html +++ b/api-index.html @@ -125,6 +125,7 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="error-kit-api.html#bind-continue">bind-continue</a><span id="line-content"> function error-kit Special form to be used inside a 'with-handler'. C... </span></span><span id="section-content"> <a href="str-utils2-api.html#blank?">blank?</a><span id="line-content"> function str-utils2 True if s is nil, empty, or contains only whitespa... </span></span><span id="section-content"> <a href="repl-utils-api.html#break-threads">break-threads</a><span id="line-content"> var repl-utils Threads to stop when Ctrl-C is pressed. See 'add-... +</span></span><span id="section-content"> <a href="http.agent-api.html#buffer-bytes">buffer-bytes</a><span id="line-content"> function http.agent The default HTTP agent result handler; it collects... </span></span><span id="section-content"> <a href="mmap-api.html#buffer-stream">buffer-stream</a><span id="line-content"> function mmap Returns an InputStream for a ByteBuffer, such as r... </span></span><span id="section-content"> <a href="jmx-api.html#build-attribute-info">build-attribute-info</a><span id="line-content"> function jmx Construct an MBeanAttributeInfo. Normally called w... </span></span><span id="section-content"> <a href="dataflow-api.html#build-dataflow">build-dataflow</a><span id="line-content"> function dataflow Given a collection of cells, build and return a da... @@ -557,10 +558,12 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="str-utils2-api.html#replace-first">replace-first</a><span id="line-content"> multimethod str-utils2 Replaces the first instance of pattern in s with r... </span></span><span id="section-content"> <a href="http.agent-api.html#response-body-bytes">response-body-bytes</a><span id="line-content"> function http.agent Returns a Java byte array of the content returned ... </span></span><span id="section-content"> <a href="http.agent-api.html#response-body-str">response-body-str</a><span id="line-content"> function http.agent Returns the HTTP response body as a string, using ... +</span></span><span id="section-content"> <a href="http.agent-api.html#response-body-stream">response-body-stream</a><span id="line-content"> function http.agent Returns an InputStream of the HTTP response body.. </span></span><span id="section-content"> <a href="http.agent-api.html#response-headers">response-headers</a><span id="line-content"> function http.agent Returns a String=>String map of HTTP response head... </span></span><span id="section-content"> <a href="http.agent-api.html#response-headers-seq">response-headers-seq</a><span id="line-content"> function http.agent Returns the HTTP response headers in order as a se... </span></span><span id="section-content"> <a href="http.agent-api.html#response-message">response-message</a><span id="line-content"> function http.agent Returns the HTTP response message (e.g. 'Not Found... </span></span><span id="section-content"> <a href="http.agent-api.html#response-status">response-status</a><span id="line-content"> function http.agent Returns the Integer response status code (e.g. 200... +</span></span><span id="section-content"> <a href="http.agent-api.html#result">result</a><span id="line-content"> function http.agent Returns the value returned by the :on-success or :... </span></span><span id="section-content"> <a href="graph-api.html#reverse-graph">reverse-graph</a><span id="line-content"> function graph Given a directed graph, return another directed gr... </span></span><span id="section-content"> <a href="zip-filter-api.html#right-locs">right-locs</a><span id="line-content"> function zip-filter Returns a lazy sequence of locations to the right ... </span></span><span id="section-content"> <a href="zip-filter-api.html#rightmost?">rightmost?</a><span id="line-content"> function zip-filter Returns true if there are no more nodes to the rig... diff --git a/api-index.json b/api-index.json index 2a18e145..a226028e 100644 --- a/api-index.json +++ b/api-index.json @@ -200,7 +200,7 @@ "doc": "Various functions for finding greatest and least values in a collection"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj", "wiki-url": "http://richhickey.github.com/clojure-contrib/http.agent-api.html", "name":"clojure.contrib.http.agent", @@ -2259,7 +2259,16 @@ "doc":"Return the argument for which f yields the smallest value.", "name":"least-by"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L198", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L73", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/buffer-bytes", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc": + "The default HTTP agent result handler; it collects the response\nbody in a java.io.ByteArrayOutputStream.", + "name":"buffer-bytes"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L243", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/client-error?", "namespace":"clojure.contrib.http.agent", @@ -2268,7 +2277,7 @@ "Returns true if the HTTP response code was in the 400-499 range.", "name":"client-error?"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L208", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L253", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/error?", "namespace":"clojure.contrib.http.agent", @@ -2277,16 +2286,16 @@ "Returns true if the HTTP response code was in the 400-499 range OR\nthe 500-599 range.", "name":"error?"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L58", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L91", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/http-agent", "namespace":"clojure.contrib.http.agent", "arglists":[["url", "&", "options"]], "doc": - "Creates (and immediately returns) an Agent representing an HTTP\nrequest running in a new thread.\n\noptions are key/value pairs:\n\n:method string\n\nThe HTTP method name. Default is \"GET\".\n\n:headers h\n\nHTTP headers, as a Map or a sequence of pairs like \n([key1,value1], [key2,value2]) Default is nil.\n\n:body b\n\nHTTP request entity body, one of nil, String, byte[], InputStream,\nReader, or File. Default is nil.\n\n:connect-timeout int\n\nTimeout value, in milliseconds, when opening a connection to the\nURL. Default is zero, meaning no timeout.\n\n:read-timeout int\n\nTimeout value, in milliseconds, when reading data from the\nconnection. Default is zero, meaning no timeout.\n\n:follow-redirects boolean\n\nIf true, HTTP 3xx redirects will be followed automatically. Default\nis true.\n\n:on-success f\n\nFunction to be called when the request succeeds with a 2xx response\ncode. Default is nil, do nothing. The function will be called with\nthe HTTP agent as its argument. Any exceptions thrown by this\nfunction will be added to the agent's error queue (see\nagent-errors).\n\n:on-failure f\n\nFunction to be called when the request fails with a 4xx or 5xx\nresponse code. Default is nil, do nothing. The function will be\ncalled with the HTTP agent as its argument. Any exceptions thrown\nby this function will become agent-errors. Any exceptions thrown by\nthis function will be added to the agent's error queue (see\nagent-errors).\n", + "Creates (and immediately returns) an Agent representing an HTTP\nrequest running in a new thread.\n\noptions are key/value pairs:\n\n:method string\n\nThe HTTP method name. Default is \"GET\".\n\n:headers h\n\nHTTP headers, as a Map or a sequence of pairs like \n([key1,value1], [key2,value2]) Default is nil.\n\n:body b\n\nHTTP request entity body, one of nil, String, byte[], InputStream,\nReader, or File. Default is nil.\n\n:connect-timeout int\n\nTimeout value, in milliseconds, when opening a connection to the\nURL. Default is zero, meaning no timeout.\n\n:read-timeout int\n\nTimeout value, in milliseconds, when reading data from the\nconnection. Default is zero, meaning no timeout.\n\n:follow-redirects boolean\n\nIf true, HTTP 3xx redirects will be followed automatically. Default\nis true.\n\n:on-success f\n\nFunction to be called when the request succeeds with a 2xx response\ncode. The function will be called with the HTTP agent as its\nargument, and can use the response-body-stream function to read the\nresponse body. The return value of this function will be stored in\nthe state of the agent and can be retrieved with the 'result'\nfunction. Any exceptions thrown by this function will be added to\nthe agent's error queue (see agent-errors). The default function\ncollects the response stream into a byte array.\n\n:on-failure f\n\nLike :on-success but this function will be called when the request\nfails with a 4xx or 5xx response code.\n", "name":"http-agent"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L189", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L234", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/redirect?", "namespace":"clojure.contrib.http.agent", @@ -2295,16 +2304,16 @@ "Returns true if the HTTP response code was in the 300-399 range.\n\nNote: if the :follow-redirects option was true (the default),\nredirects will be followed automatically and a the agent will never\nreturn a 3xx response code.", "name":"redirect?"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L122", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L165", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-body-bytes", "namespace":"clojure.contrib.http.agent", - "arglists":[["a"]], + "arglists":[["http-agnt"]], "doc": - "Returns a Java byte array of the content returned by the server.", + "Returns a Java byte array of the content returned by the server;\nnil if the content is not yet available.", "name":"response-body-bytes"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L128", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L174", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-body-str", "namespace":"clojure.contrib.http.agent", @@ -2313,7 +2322,15 @@ "Returns the HTTP response body as a string, using the given\nencoding.\n\nIf no encoding is given, uses the encoding specified in the server\nheaders, or clojure.contrib.duck-streams/*default-encoding* if it is\nnot specified.", "name":"response-body-str"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L158", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L65", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-body-stream", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc":"Returns an InputStream of the HTTP response body.", + "name":"response-body-stream"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L203", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-headers", "namespace":"clojure.contrib.http.agent", @@ -2322,7 +2339,7 @@ "Returns a String=>String map of HTTP response headers. Header\nnames are converted to all lower-case. If a header appears more\nthan once, only the last value is returned.", "name":"response-headers"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L167", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L212", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-headers-seq", "namespace":"clojure.contrib.http.agent", @@ -2331,7 +2348,7 @@ "Returns the HTTP response headers in order as a sequence of\n[String,String] pairs. The first 'header' name may be null for the\nHTTP status line.", "name":"response-headers-seq"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L152", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L197", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-message", "namespace":"clojure.contrib.http.agent", @@ -2340,7 +2357,7 @@ "Returns the HTTP response message (e.g. 'Not Found'), for this request.", "name":"response-message"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L146", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L191", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-status", "namespace":"clojure.contrib.http.agent", @@ -2349,7 +2366,16 @@ "Returns the Integer response status code (e.g. 200, 404) for this request.", "name":"response-status"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L203", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L156", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/result", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc": + "Returns the value returned by the :on-success or :on-failure\nhandler function of the HTTP agent; nil if the handler function has\nnot yet finished. The default handler function returns a\nByteArrayOutputStream.", + "name":"result"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L248", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/server-error?", "namespace":"clojure.contrib.http.agent", @@ -2358,7 +2384,7 @@ "Returns true if the HTTP response code was in the 500-599 range.", "name":"server-error?"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L184", + "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L229", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/success?", "namespace":"clojure.contrib.http.agent", diff --git a/http.agent-api.html b/http.agent-api.html index 1ed4484b..c2af7d17 100644 --- a/http.agent-api.html +++ b/http.agent-api.html @@ -55,6 +55,8 @@ namespace. <div style="margin-left: 1em;" class="toc-section"> <a href="#toc0">Overview</a> <div style="margin-left: 1em;" class="toc-entry"> + <a href="#http.agent/buffer-bytes">buffer-bytes</a> + </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/client-error?">client-error?</a> </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/error?">error?</a> @@ -67,6 +69,8 @@ namespace. </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/response-body-str">response-body-str</a> </div><div style="margin-left: 1em;" class="toc-entry"> + <a href="#http.agent/response-body-stream">response-body-stream</a> + </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/response-headers">response-headers</a> </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/response-headers-seq">response-headers-seq</a> @@ -75,6 +79,8 @@ namespace. </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/response-status">response-status</a> </div><div style="margin-left: 1em;" class="toc-entry"> + <a href="#http.agent/result">result</a> + </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/server-error?">server-error?</a> </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/success?">success?</a> @@ -96,12 +102,21 @@ by <span id="author">Unknown</span><br /> <h2>Public Variables and Functions</h2> <div id="var-entry"> <hr /> + <h2 id="http.agent/buffer-bytes">buffer-bytes</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (buffer-bytes http-agnt) +</pre> + <pre id="var-docstr">The default HTTP agent result handler; it collects the response +body in a java.io.ByteArrayOutputStream.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L73" id="var-source">Source</a> +</div><div id="var-entry"> + <hr /> <h2 id="http.agent/client-error?">client-error?</h2> <span id="var-type">function</span><br /> <pre id="var-usage">Usage: (client-error? http-agnt) </pre> <pre id="var-docstr">Returns true if the HTTP response code was in the 400-499 range.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L198" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L243" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/error?">error?</h2> @@ -110,7 +125,7 @@ by <span id="author">Unknown</span><br /> </pre> <pre id="var-docstr">Returns true if the HTTP response code was in the 400-499 range OR the 500-599 range.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L208" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L253" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/http-agent">http-agent</h2> @@ -154,21 +169,20 @@ is true. :on-success f Function to be called when the request succeeds with a 2xx response -code. Default is nil, do nothing. The function will be called with -the HTTP agent as its argument. Any exceptions thrown by this -function will be added to the agent's error queue (see -agent-errors). +code. The function will be called with the HTTP agent as its +argument, and can use the response-body-stream function to read the +response body. The return value of this function will be stored in +the state of the agent and can be retrieved with the 'result' +function. Any exceptions thrown by this function will be added to +the agent's error queue (see agent-errors). The default function +collects the response stream into a byte array. :on-failure f -Function to be called when the request fails with a 4xx or 5xx -response code. Default is nil, do nothing. The function will be -called with the HTTP agent as its argument. Any exceptions thrown -by this function will become agent-errors. Any exceptions thrown by -this function will be added to the agent's error queue (see -agent-errors). +Like :on-success but this function will be called when the request +fails with a 4xx or 5xx response code. </pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L58" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L91" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/redirect?">redirect?</h2> @@ -180,15 +194,16 @@ agent-errors). Note: if the :follow-redirects option was true (the default), redirects will be followed automatically and a the agent will never return a 3xx response code.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L189" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L234" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/response-body-bytes">response-body-bytes</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-body-bytes a) + <pre id="var-usage">Usage: (response-body-bytes http-agnt) </pre> - <pre id="var-docstr">Returns a Java byte array of the content returned by the server.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L122" id="var-source">Source</a> + <pre id="var-docstr">Returns a Java byte array of the content returned by the server; +nil if the content is not yet available.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L165" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/response-body-str">response-body-str</h2> @@ -202,7 +217,15 @@ encoding. If no encoding is given, uses the encoding specified in the server headers, or clojure.contrib.duck-streams/*default-encoding* if it is not specified.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L128" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L174" id="var-source">Source</a> +</div><div id="var-entry"> + <hr /> + <h2 id="http.agent/response-body-stream">response-body-stream</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (response-body-stream http-agnt) +</pre> + <pre id="var-docstr">Returns an InputStream of the HTTP response body.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L65" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/response-headers">response-headers</h2> @@ -212,7 +235,7 @@ not specified.</pre> <pre id="var-docstr">Returns a String=>String map of HTTP response headers. Header names are converted to all lower-case. If a header appears more than once, only the last value is returned.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L158" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L203" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/response-headers-seq">response-headers-seq</h2> @@ -222,7 +245,7 @@ than once, only the last value is returned.</pre> <pre id="var-docstr">Returns the HTTP response headers in order as a sequence of [String,String] pairs. The first 'header' name may be null for the HTTP status line.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L167" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L212" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/response-message">response-message</h2> @@ -230,7 +253,7 @@ HTTP status line.</pre> <pre id="var-usage">Usage: (response-message a) </pre> <pre id="var-docstr">Returns the HTTP response message (e.g. 'Not Found'), for this request.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L152" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L197" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/response-status">response-status</h2> @@ -238,7 +261,18 @@ HTTP status line.</pre> <pre id="var-usage">Usage: (response-status a) </pre> <pre id="var-docstr">Returns the Integer response status code (e.g. 200, 404) for this request.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L146" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L191" id="var-source">Source</a> +</div><div id="var-entry"> + <hr /> + <h2 id="http.agent/result">result</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (result http-agnt) +</pre> + <pre id="var-docstr">Returns the value returned by the :on-success or :on-failure +handler function of the HTTP agent; nil if the handler function has +not yet finished. The default handler function returns a +ByteArrayOutputStream.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L156" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/server-error?">server-error?</h2> @@ -246,7 +280,7 @@ HTTP status line.</pre> <pre id="var-usage">Usage: (server-error? http-agnt) </pre> <pre id="var-docstr">Returns true if the HTTP response code was in the 500-599 range.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L203" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L248" id="var-source">Source</a> </div><div id="var-entry"> <hr /> <h2 id="http.agent/success?">success?</h2> @@ -254,7 +288,7 @@ HTTP status line.</pre> <pre id="var-usage">Usage: (success? http-agnt) </pre> <pre id="var-docstr">Returns true if the HTTP response code was in the 200-299 range.</pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/54ee3b6fc9d625bb476f38b096f80b791cfa9b65/src/clojure/contrib/http/agent.clj#L184" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L229" id="var-source">Source</a> </div> @@ -895,7 +895,7 @@ defined for any type.</pre> <pre id="namespace-docstr">Agent-based asynchronous HTTP client.</pre> Public variables and functions: - <span id="var-link"><a href="http.agent-api.html#http.agent/client-error?" id="var-tag">client-error?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/error?" id="var-tag">error?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/http-agent" id="var-tag">http-agent</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/redirect?" id="var-tag">redirect?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-body-bytes" id="var-tag">response-body-bytes</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-body-str" id="var-tag">response-body-str</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-headers" id="var-tag">response-headers</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-headers-seq" id="var-tag">response-headers-seq</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-message" id="var-tag">response-message</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-status" id="var-tag">response-status</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/server-error?" id="var-tag">server-error?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/success?" id="var-tag">success?</a> </span><br /> + <span id="var-link"><a href="http.agent-api.html#http.agent/buffer-bytes" id="var-tag">buffer-bytes</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/client-error?" id="var-tag">client-error?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/error?" id="var-tag">error?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/http-agent" id="var-tag">http-agent</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/redirect?" id="var-tag">redirect?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-body-bytes" id="var-tag">response-body-bytes</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-body-str" id="var-tag">response-body-str</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-body-stream" id="var-tag">response-body-stream</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-headers" id="var-tag">response-headers</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-headers-seq" id="var-tag">response-headers-seq</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-message" id="var-tag">response-message</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/response-status" id="var-tag">response-status</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/result" id="var-tag">result</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/server-error?" id="var-tag">server-error?</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/success?" id="var-tag">success?</a> </span><br /> </div><div id="namespace-entry"> <br /> |