* module/web/http.scm (http-proxy-port?, set-http-proxy-port?!): New
exported procedures.
(write-request-line): If we're using an http proxy, write an
absolute-URI in the request line.
* module/web/client.scm: Import (web http).
(current-http-proxy): New exported parameter.
(open-socket-for-uri): If 'current-http-proxy' is not false,
connect to the proxy instead of the URI host, and use
'set-http-proxy-port?!' to make note of that fact.
* doc/ref/web.texi (Web Client): Document 'current-http-proxy'.
* doc/ref/web.texi: Say `World Wide Web'; the hyphenated form is almost
never used (c.f. w3.org).
General predicate arguments are named `obj'. Fill in arguments
omitted from some procedure definitions (e.g. `request-method').
Minor tweaks, such as using en-dash and missing markup as appropriate.
Wrap very long deffn lines.
* module/web/*.scm: Expand texinfo markup in doc strings. Synchronize
with changes in web.texi.
* module/web/client.scm (ensure-uri): New helper.
(open-socket-for-uri): Accept a URI as a string or as a URI object.
(extend-request, sanitize-request): New helpers, like the
corresponding functions in (web server).
(decode-response-body): Add a reference to the HTTP/1.1 spec, and
use (ice-9 iconv).
(request): New helper, factoring all aspects of sending an HTTP
request and getting a response.
(http-get): Redefine in terms of http-get. Deprecate the
#:extra-headers argument in favor of #:headers. Allow a body. Add a
#:streaming? argument, subsuming the functionality of http-get*.
(http-get*): Deprecate.
(http-head, http-post, http-put, http-delete, http-trace)
(http-options): Define interfaces for all HTTP verbs.
* test-suite/tests/web-client.test: Add tests.
* doc/ref/web.texi: Update documentation.
Thanks to Gregory Benison for the initial patch.
* module/web/http.scm ("Connection"): Write the "close" token in
lower-case.
* module/web/client.scm (http-get): Don't shutdown the writing side of
the pipe if we are not doing a keepalive, as this may prevent the
request from being sent at all. Prevented http://friendfeed.com/ from
being correctly fetched.
* module/web/client.scm (open-socket-for-uri): Delete addrinfos
with the same address. Always open SOCK_STREAM/IPPROTO_IP sockets.
Fix the error handler's condition to determine what to do.
Reported by Nikita Karetnikov <nikita.karetnikov@gmail.com> at
<http://lists.gnu.org/archive/html/bug-guix/2012-12/msg00150.html>.
* doc/ref/web.texi: Fix spacing. Update with a few missing function
descriptions.
* module/web/client.scm:
* module/web/http.scm:
* module/web/request.scm:
* module/web/server.scm:
* module/web/uri.scm: Update docstrings from manual (reworked by Ludovic
Courtès).