Permalink
Browse files

Merge pull request #31 from zellerin/master

Use *default-http-proxy* as default.
  • Loading branch information...
2 parents 5130825 + a8a3ba2 commit c9b978fbcc2ea3d0d2dbcee9d6bf10de9ed6b5da @hanshuebner hanshuebner committed Jul 4, 2013
Showing with 27 additions and 3 deletions.
  1. +16 −1 doc/index.xml
  2. +1 −0 packages.lisp
  3. +3 −2 request.lisp
  4. +7 −0 specials.lisp
View
@@ -957,7 +957,8 @@ T</span>
the request should be sent. Or it can be a list of two
values - a string denoting the proxy server and an integer
denoting the port to use (which will default to 80
- otherwise).
+ otherwise). Defaults to
+ <clix:arg>*default-http-proxy*</clix:arg>.
<clix:arg>proxy-basic-authorization</clix:arg> is used
like <clix:arg>basic-authorization</clix:arg>, but for the
proxy, and only if <clix:arg>proxy</clix:arg> is true.
@@ -1172,6 +1173,20 @@ T</span>
</clix:description>
</clix:special-variable>
+ <clix:special-variable name="*default-http-proxy*">
+ <clix:description>
+ <p>
+ HTTP proxy to be used as default for the proxy keyword
+ argument of <clix:ref>HTTP-REQUEST</clix:ref>. If not
+ <code>NIL</code>, it should be a string denoting a proxy
+ server through which the request should be sent. Or it
+ can be a list of two values - a string denoting the proxy
+ server and an integer denoting the port to use (which
+ will default to 80 otherwise).
+ </p>
+ </clix:description>
+ </clix:special-variable>
+
<clix:special-variable name="*drakma-default-external-format*">
<clix:description>
<p>
View
@@ -37,6 +37,7 @@
(:export #:*allow-dotless-cookie-domains-p*
#:*body-format-function*
#:*remove-duplicate-cookies-p*
+ #:*default-http-proxy*
#:*drakma-default-external-format*
#:*header-stream*
#:*ignore-unparseable-cookie-dates-p*
View
@@ -205,7 +205,7 @@ headers of the chunked stream \(if any) as a second value."
(user-agent :drakma)
(accept "*/*")
range
- proxy
+ (proxy *default-http-proxy*)
proxy-basic-authorization
real-host
additional-headers
@@ -375,7 +375,8 @@ If PROXY is not NIL, it should be a string denoting a proxy
server through which the request should be sent. Or it can be a
list of two values - a string denoting the proxy server and an
integer denoting the port to use \(which will default to 80
-otherwise). PROXY-BASIC-AUTHORIZATION is used like
+otherwise). Defaults to *default-http-proxy*.
+PROXY-BASIC-AUTHORIZATION is used like
BASIC-AUTHORIZATION, but for the proxy, and only if PROXY is
true.
View
@@ -248,6 +248,13 @@ proceeds as described in the HTTP-REQUEST documentation entry.")
"An alist which maps time zone abbreviations to Common Lisp
timezones.")
+(defvar *default-http-proxy* nil
+ "HTTP proxy to be used as default. If not NIL, it should be a string
+denoting a proxy server through which the request should be sent. Or
+it can be a list of two values - a string denoting the proxy server
+and an integer denoting the port to use \(which will default to 80
+otherwise).")
+
;; stuff for Nikodemus Siivola's HYPERDOC
;; see <http://common-lisp.net/project/hyperdoc/>
;; and <http://www.cliki.net/hyperdoc>

0 comments on commit c9b978f

Please sign in to comment.