diff options
author | Tom Faulhaber <git_net@infolace.com> | 2009-08-17 10:37:38 -0700 |
---|---|---|
committer | Tom Faulhaber <git_net@infolace.com> | 2009-08-17 10:37:38 -0700 |
commit | 25ea256e83384a8664bc14c4e941c739fe6e06de (patch) | |
tree | b5b3f205ddc7abb499d17194b0b3ccad20f03412 | |
parent | 3ce40658ed003ba07d45f91e4e94a30d621274be (diff) |
Updated documentation for commit 74f64cdea1debc7e2442f9337f28a25a769792d2
-rw-r--r-- | api-index.html | 21 | ||||
-rw-r--r-- | api-index.json | 148 | ||||
-rw-r--r-- | http.agent-api.html | 232 | ||||
-rw-r--r-- | index.html | 2 |
4 files changed, 258 insertions, 145 deletions
diff --git a/api-index.html b/api-index.html index e59e35e6..418cbf6c 100644 --- a/api-index.html +++ b/api-index.html @@ -135,6 +135,7 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="dataflow-api.html#build-validator-cell">build-validator-cell</a><span id="line-content"> function dataflow Builds a validator cell. </span></span><span id="section-content"> <a href="datalog-api.html#build-work-plan">build-work-plan</a><span id="line-content"> function datalog Given a list of rules and a query, build a work pl... </span></span><span id="section-content"> <a href="str-utils2-api.html#butlast">butlast</a><span id="line-content"> function str-utils2 Returns s without the last n characters. Returns ... +</span></span><span id="section-content"> <a href="http.agent-api.html#bytes">bytes</a><span id="line-content"> function http.agent Returns a Java byte array of the content returned ... </span></span></pre> </div><div id="index-body"> <h2><span id="section-head">C</span></h2> @@ -234,6 +235,7 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="str-utils2-api.html#docodepoints">docodepoints</a><span id="line-content"> macro str-utils2 bindings => [name string] Repeatedly executes bod... </span></span><span id="section-content"> <a href="ns-utils-api.html#docs">docs</a><span id="line-content"> macro ns-utils Prints documentation for the public vars in a name... </span></span><span id="section-content"> <a href="monads-api.html#domonad">domonad</a><span id="line-content"> macro monads Monad comprehension. Takes the name of a monad, a ... +</span></span><span id="section-content"> <a href="http.agent-api.html#done?">done?</a><span id="line-content"> function http.agent Returns true if the HTTP request/response has comp... </span></span><span id="section-content"> <a href="sql-api.html#drop-table">drop-table</a><span id="line-content"> function sql Drops a table on the open database connection give... </span></span></pre> </div><div id="index-body"> @@ -336,6 +338,8 @@ Shortcuts:<br /> <span id="section-content"> <a href="prxml-api.html#*html-compatible*">*html-compatible*</a><span id="line-content"> var prxml If true, empty tags will have a space before the c... </span></span><span id="section-content"> <a href="error-kit-api.html#handle">handle</a><span id="line-content"> function error-kit Special form to be used inside a 'with-handler'. ... </span></span><span id="section-content"> <a href="condition-api.html#handler-case">handler-case</a><span id="line-content"> macro condition Executes body in a context where raised conditions... +</span></span><span id="section-content"> <a href="http.agent-api.html#headers">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#headers-seq">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#http-agent">http-agent</a><span id="line-content"> function http.agent Creates (and immediately returns) an Agent represe... </span></span><span id="section-content"> <a href="http.connection-api.html#http-connection">http-connection</a><span id="line-content"> function http.connection Opens an HttpURLConnection at the URL, handled by ... </span></span></pre> @@ -428,6 +432,8 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="jmx-api.html#mbean">mbean</a><span id="line-content"> function jmx Like clojure.core/bean, but for JMX beans. Returns... </span></span><span id="section-content"> <a href="jmx-api.html#mbean-names">mbean-names</a><span id="line-content"> function jmx Finds all MBeans matching a name on the current *c... </span></span><span id="section-content"> <a href="swing-utils-api.html#menu-constructor-dispatch">menu-constructor-dispatch</a><span id="line-content"> var swing-utils An atom containing the dispatch set for the add-me... +</span></span><span id="section-content"> <a href="http.agent-api.html#message">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#method">method</a><span id="line-content"> function http.agent Returns the HTTP method name used by this HTTP age... </span></span><span id="section-content"> <a href="macro-utils-api.html#mexpand">mexpand</a><span id="line-content"> function macro-utils Like clojure.core/macroexpand, but takes into acco... </span></span><span id="section-content"> <a href="macro-utils-api.html#mexpand-1">mexpand-1</a><span id="line-content"> function macro-utils Like clojure.core/macroexpand-1, but takes into ac... </span></span><span id="section-content"> <a href="macro-utils-api.html#mexpand-all">mexpand-all</a><span id="line-content"> function macro-utils Perform a full recursive macro expansion of a form... @@ -557,14 +563,10 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="repl-ln-api.html#repl-prompt">repl-prompt</a><span id="line-content"> function repl-ln Returns the current repl prompt based on this repl... </span></span><span id="section-content"> <a href="str-utils2-api.html#replace">replace</a><span id="line-content"> multimethod str-utils2 Replaces all instances of pattern in string with r... </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="http.agent-api.html#request-body">request-body</a><span id="line-content"> function http.agent Returns the HTTP request body given to this HTTP a... +</span></span><span id="section-content"> <a href="http.agent-api.html#request-headers">request-headers</a><span id="line-content"> function http.agent Returns the request headers specified for this HTT... +</span></span><span id="section-content"> <a href="http.agent-api.html#request-uri">request-uri</a><span id="line-content"> function http.agent Returns the URI/URL requested by this HTTP agent, ... +</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 :handler functio... </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... @@ -630,8 +632,10 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="monads-api.html#state-m">state-m</a><span id="line-content"> var monads Monad describing stateful computations. The monadi... </span></span><span id="section-content"> <a href="monads-api.html#state-m-until">state-m-until</a><span id="line-content"> function monads An optimized implementation of m-until for the sta... </span></span><span id="section-content"> <a href="monads-api.html#state-t">state-t</a><span id="line-content"> function monads Monad transformer that transforms a monad m into a... +</span></span><span id="section-content"> <a href="http.agent-api.html#status">status</a><span id="line-content"> function http.agent Returns the HTTP response status code (e.g. 200, 4... </span></span><span id="section-content"> <a href="str-utils-api.html#str-join">str-join</a><span id="line-content"> function str-utils Returns a string of all elements in 'sequence', se... </span></span><span id="section-content"> <a href="graph-api.html#stratification-list">stratification-list</a><span id="line-content"> function graph Similar to dependency-list (see doc), except two g... +</span></span><span id="section-content"> <a href="http.agent-api.html#stream">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="stream-utils-api.html#stream-drop">stream-drop</a><span id="line-content"> function stream-utils Return a stream containing all but the first n ele... </span></span><span id="section-content"> <a href="stream-utils-api.html#stream-filter">stream-filter</a><span id="line-content"> multimethod stream-utils Return a new stream that contrains the elements of... </span></span><span id="section-content"> <a href="stream-utils-api.html#stream-flatten">stream-flatten</a><span id="line-content"> function stream-utils Converts a stream of sequences into a stream of th... @@ -641,6 +645,7 @@ Shortcuts:<br /> </span></span><span id="section-content"> <a href="repl-ln-api.html#stream-repl">stream-repl</a><span id="line-content"> function repl-ln Repl entry point that provides convenient overridi... </span></span><span id="section-content"> <a href="stream-utils-api.html#stream-seq">stream-seq</a><span id="line-content"> function stream-utils Return a lazy seq on the stream. Also accessible v... </span></span><span id="section-content"> <a href="stream-utils-api.html#stream-type">stream-type</a><span id="line-content"> var stream-utils The root type for the stream hierarchy. For each s... +</span></span><span id="section-content"> <a href="http.agent-api.html#string">string</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="set-api.html#subset?">subset?</a><span id="line-content"> function set Is set1 a subset of set2?. </span></span><span id="section-content"> <a href="combinatorics-api.html#subsets">subsets</a><span id="line-content"> function combinatorics All the subsets of items. </span></span><span id="section-content"> <a href="http.agent-api.html#success?">success?</a><span id="line-content"> function http.agent Returns true if the HTTP response code was in the ... diff --git a/api-index.json b/api-index.json index 3d9893d7..9f31fc8e 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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj", "wiki-url": "http://richhickey.github.com/clojure-contrib/http.agent-api.html", "name":"clojure.contrib.http.agent", @@ -2260,16 +2260,25 @@ "doc":"Return the argument for which f yields the smallest value.", "name":"least-by"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L73", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L93", "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.", + "The default HTTP agent result handler; it collects the response\nbody in a java.io.ByteArrayOutputStream, which can later be\nretrieved with the 'stream', 'string', and 'bytes' functions.", "name":"buffer-bytes"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L243", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L198", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/bytes", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc": + "Returns a Java byte array of the content returned by the server;\nnil if the content is not yet available.", + "name":"bytes"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L306", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/client-error?", "namespace":"clojure.contrib.http.agent", @@ -2278,7 +2287,15 @@ "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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L253", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L246", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/done?", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc":"Returns true if the HTTP request/response has completed.", + "name":"done?"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L316", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/error?", "namespace":"clojure.contrib.http.agent", @@ -2287,96 +2304,96 @@ "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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L91", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L267", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/http-agent", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/headers", "namespace":"clojure.contrib.http.agent", - "arglists":[["url", "&", "options"]], + "arglists":[["http-agnt"]], "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. 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"}, + "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":"headers"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L234", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L276", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/redirect?", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/headers-seq", "namespace":"clojure.contrib.http.agent", "arglists":[["http-agnt"]], "doc": - "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?"}, + "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":"headers-seq"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L165", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L114", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-body-bytes", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/http-agent", "namespace":"clojure.contrib.http.agent", - "arglists":[["http-agnt"]], + "arglists":[["uri", "&", "options"]], "doc": - "Returns a Java byte array of the content returned by the server;\nnil if the content is not yet available.", - "name":"response-body-bytes"}, + "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:handler f\n\nFunction to be called when the HTTP response body is ready. If you\ndo NOT provide a handler function, the default is to buffer the\nentire response body in memory.\n\nThe handler function will be called with the HTTP agent as its\nargument, and can use the 'stream' function to read the response\nbody. The return value of this function will be stored in the state\nof the agent and can be retrieved with the 'result' function. Any\nexceptions thrown by this function will be added to the agent's\nerror queue (see agent-errors). The default function collects the\nresponse stream into a byte array.\n", + "name":"http-agent"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L174", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L260", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-body-str", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/message", "namespace":"clojure.contrib.http.agent", - "arglists":[["http-agnt"], ["http-agnt", "encoding"]], + "arglists":[["http-agnt"]], "doc": - "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"}, + "Returns the HTTP response message (e.g. 'Not Found'), for this\nrequest, or nil if the response has not yet been received.", + "name":"message"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L65", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L230", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-body-stream", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/method", "namespace":"clojure.contrib.http.agent", "arglists":[["http-agnt"]], - "doc":"Returns an InputStream of the HTTP response body.", - "name":"response-body-stream"}, + "doc": + "Returns the HTTP method name used by this HTTP agent, as a String.", + "name":"method"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L203", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L297", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-headers", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/redirect?", "namespace":"clojure.contrib.http.agent", - "arglists":[["a"]], + "arglists":[["http-agnt"]], "doc": - "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"}, + "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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L212", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L235", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-headers-seq", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/request-body", "namespace":"clojure.contrib.http.agent", "arglists":[["http-agnt"]], "doc": - "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"}, + "Returns the HTTP request body given to this HTTP agent. \n\nNote: if the request body was an InputStream or a Reader, it will no\nlonger be usable.", + "name":"request-body"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L197", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L225", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-message", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/request-headers", "namespace":"clojure.contrib.http.agent", - "arglists":[["a"]], - "doc": - "Returns the HTTP response message (e.g. 'Not Found'), for this request.", - "name":"response-message"}, + "arglists":[["http-agnt"]], + "doc":"Returns the request headers specified for this HTTP agent.", + "name":"request-headers"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L191", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L220", "wiki-url": - "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/response-status", + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/request-uri", "namespace":"clojure.contrib.http.agent", - "arglists":[["a"]], + "arglists":[["http-agnt"]], "doc": - "Returns the Integer response status code (e.g. 200, 404) for this request.", - "name":"response-status"}, + "Returns the URI/URL requested by this HTTP agent, as a String.", + "name":"request-uri"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L156", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L177", "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.", + "Returns the value returned by the :handler function of the HTTP\nagent; blocks until the HTTP request is completed. The default\nhandler function returns a ByteArrayOutputStream.", "name":"result"}, {"source-url": - "http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L248", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L311", "wiki-url": "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/server-error?", "namespace":"clojure.contrib.http.agent", @@ -2385,7 +2402,34 @@ "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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L229", + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L252", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/status", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc": + "Returns the HTTP response status code (e.g. 200, 404) for this\nrequest, as an Integer, or nil if the status has not yet been\nreceived.", + "name":"status"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L185", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/stream", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"]], + "doc": + "Returns an InputStream of the HTTP response body. When called by\nthe handler function passed to http-agent, this is the raw\nHttpURLConnection stream.\n\nIf the default handler function was used, this function returns a\nByteArrayInputStream on the buffered response body.", + "name":"stream"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L204", + "wiki-url": + "http://richhickey.github.com/clojure-contrib//http.agent-api.html#http.agent/string", + "namespace":"clojure.contrib.http.agent", + "arglists":[["http-agnt"], ["http-agnt", "encoding"]], + "doc": + "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":"string"}, + {"source-url": + "http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L292", "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 7828ed52..3fa4cb96 100644 --- a/http.agent-api.html +++ b/http.agent-api.html @@ -57,32 +57,42 @@ namespace. <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/bytes">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/done?">done?</a> + </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/error?">error?</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/http-agent">http-agent</a> + <a href="#http.agent/headers">headers</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/redirect?">redirect?</a> + <a href="#http.agent/headers-seq">headers-seq</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-body-bytes">response-body-bytes</a> + <a href="#http.agent/http-agent">http-agent</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-body-str">response-body-str</a> + <a href="#http.agent/message">message</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-body-stream">response-body-stream</a> + <a href="#http.agent/method">method</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-headers">response-headers</a> + <a href="#http.agent/redirect?">redirect?</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-headers-seq">response-headers-seq</a> + <a href="#http.agent/request-body">request-body</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-message">response-message</a> + <a href="#http.agent/request-headers">request-headers</a> </div><div style="margin-left: 1em;" class="toc-entry"> - <a href="#http.agent/response-status">response-status</a> + <a href="#http.agent/request-uri">request-uri</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/status">status</a> + </div><div style="margin-left: 1em;" class="toc-entry"> + <a href="#http.agent/stream">stream</a> + </div><div style="margin-left: 1em;" class="toc-entry"> + <a href="#http.agent/string">string</a> + </div><div style="margin-left: 1em;" class="toc-entry"> <a href="#http.agent/success?">success?</a> </div> <br /> @@ -108,8 +118,19 @@ by <span id="author">Unknown</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> +body in a java.io.ByteArrayOutputStream, which can later be +retrieved with the 'stream', 'string', and 'bytes' functions.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L93" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="http.agent/bytes">bytes</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (bytes http-agnt) +</pre> + <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/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L198" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -118,7 +139,16 @@ body in a java.io.ByteArrayOutputStream.</pre> <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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L243" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L306" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="http.agent/done?">done?</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (done? http-agnt) +</pre> + <pre id="var-docstr">Returns true if the HTTP request/response has completed.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L246" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -128,13 +158,35 @@ body in a java.io.ByteArrayOutputStream.</pre> </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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L253" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L316" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="http.agent/headers">headers</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (headers http-agnt) +</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/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L267" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="http.agent/headers-seq">headers-seq</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (headers-seq http-agnt) +</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/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L276" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> <h2 id="http.agent/http-agent">http-agent</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (http-agent url & options) + <pre id="var-usage">Usage: (http-agent uri & options) </pre> <pre id="var-docstr">Creates (and immediately returns) an Agent representing an HTTP request running in a new thread. @@ -170,23 +222,40 @@ connection. Default is zero, meaning no timeout. If true, HTTP 3xx redirects will be followed automatically. Default is true. -:on-success f +:handler f -Function to be called when the request succeeds with a 2xx response -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. +Function to be called when the HTTP response body is ready. If you +do NOT provide a handler function, the default is to buffer the +entire response body in memory. -:on-failure f - -Like :on-success but this function will be called when the request -fails with a 4xx or 5xx response code. +The handler function will be called with the HTTP agent as its +argument, and can use the '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. </pre> - <a href="http://github.com/richhickey/clojure-contrib/blob/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L91" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L114" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="http.agent/message">message</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (message http-agnt) +</pre> + <pre id="var-docstr">Returns the HTTP response message (e.g. 'Not Found'), for this +request, or nil if the response has not yet been received.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L260" id="var-source">Source</a> +</div><div id="var-entry"> + <br /> + <hr /> + <h2 id="http.agent/method">method</h2> + <span id="var-type">function</span><br /> + <pre id="var-usage">Usage: (method http-agnt) +</pre> + <pre id="var-docstr">Returns the HTTP method name used by this HTTP agent, as a String.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L230" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -199,102 +268,97 @@ fails with a 4xx or 5xx response code. 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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L234" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L297" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/response-body-bytes">response-body-bytes</h2> + <h2 id="http.agent/request-body">request-body</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-body-bytes http-agnt) + <pre id="var-usage">Usage: (request-body http-agnt) </pre> - <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"> - <br /> - <hr /> - <h2 id="http.agent/response-body-str">response-body-str</h2> - <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-body-str http-agnt) - (response-body-str http-agnt encoding) -</pre> - <pre id="var-docstr">Returns the HTTP response body as a string, using the given -encoding. + <pre id="var-docstr">Returns the HTTP request body given to this HTTP agent. -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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L174" id="var-source">Source</a> +Note: if the request body was an InputStream or a Reader, it will no +longer be usable.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L235" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/response-body-stream">response-body-stream</h2> + <h2 id="http.agent/request-headers">request-headers</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-body-stream http-agnt) + <pre id="var-usage">Usage: (request-headers 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> + <pre id="var-docstr">Returns the request headers specified for this HTTP agent.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L225" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/response-headers">response-headers</h2> + <h2 id="http.agent/request-uri">request-uri</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-headers a) + <pre id="var-usage">Usage: (request-uri http-agnt) </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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L203" id="var-source">Source</a> + <pre id="var-docstr">Returns the URI/URL requested by this HTTP agent, as a String.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L220" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/response-headers-seq">response-headers-seq</h2> + <h2 id="http.agent/result">result</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-headers-seq http-agnt) + <pre id="var-usage">Usage: (result http-agnt) </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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L212" id="var-source">Source</a> + <pre id="var-docstr">Returns the value returned by the :handler function of the HTTP +agent; blocks until the HTTP request is completed. The default +handler function returns a ByteArrayOutputStream.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L177" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/response-message">response-message</h2> + <h2 id="http.agent/server-error?">server-error?</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-message a) + <pre id="var-usage">Usage: (server-error? http-agnt) </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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L197" id="var-source">Source</a> + <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/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L311" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/response-status">response-status</h2> + <h2 id="http.agent/status">status</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (response-status a) + <pre id="var-usage">Usage: (status http-agnt) </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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L191" id="var-source">Source</a> + <pre id="var-docstr">Returns the HTTP response status code (e.g. 200, 404) for this +request, as an Integer, or nil if the status has not yet been +received.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L252" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/result">result</h2> + <h2 id="http.agent/stream">stream</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (result http-agnt) + <pre id="var-usage">Usage: (stream 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> + <pre id="var-docstr">Returns an InputStream of the HTTP response body. When called by +the handler function passed to http-agent, this is the raw +HttpURLConnection stream. + +If the default handler function was used, this function returns a +ByteArrayInputStream on the buffered response body.</pre> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L185" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> - <h2 id="http.agent/server-error?">server-error?</h2> + <h2 id="http.agent/string">string</h2> <span id="var-type">function</span><br /> - <pre id="var-usage">Usage: (server-error? http-agnt) + <pre id="var-usage">Usage: (string http-agnt) + (string http-agnt encoding) </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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L248" id="var-source">Source</a> + <pre id="var-docstr">Returns the HTTP response body as a string, using the given +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/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L204" id="var-source">Source</a> </div><div id="var-entry"> <br /> <hr /> @@ -303,7 +367,7 @@ ByteArrayOutputStream.</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/ed89b92ef38056520a1cd7cfb725a4d6cedf980b/src/clojure/contrib/http/agent.clj#L229" id="var-source">Source</a> + <a href="http://github.com/richhickey/clojure-contrib/blob/74f64cdea1debc7e2442f9337f28a25a769792d2/src/clojure/contrib/http/agent.clj#L292" 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/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 /> + <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/bytes" id="var-tag">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/done?" id="var-tag">done?</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/headers" id="var-tag">headers</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/headers-seq" id="var-tag">headers-seq</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/message" id="var-tag">message</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/method" id="var-tag">method</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/request-body" id="var-tag">request-body</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/request-headers" id="var-tag">request-headers</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/request-uri" id="var-tag">request-uri</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/status" id="var-tag">status</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/stream" id="var-tag">stream</a> </span><span id="var-link"><a href="http.agent-api.html#http.agent/string" id="var-tag">string</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 /> |