Skip to content

Commit

Permalink
Fix all whitespace issues. Patch from dhermes@google.com.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgregorio committed Feb 19, 2013
1 parent fe22a15 commit 2676371
Show file tree
Hide file tree
Showing 24 changed files with 269 additions and 269 deletions.
82 changes: 41 additions & 41 deletions README
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@ Httplib2
--------------------------------------------------------------------
Introduction

A comprehensive HTTP client library, httplib2.py supports many
A comprehensive HTTP client library, httplib2.py supports many
features left out of other HTTP libraries.

HTTP and HTTPS
HTTPS support is only available if the socket module was
compiled with SSL support.
HTTPS support is only available if the socket module was
compiled with SSL support.
Keep-Alive
Supports HTTP 1.1 Keep-Alive, keeping the socket open and
performing multiple requests over the same connection if
possible.
Supports HTTP 1.1 Keep-Alive, keeping the socket open and
performing multiple requests over the same connection if
possible.
Authentication
The following three types of HTTP Authentication are
The following three types of HTTP Authentication are
supported. These can be used over both HTTP and HTTPS.

* Digest
* Basic
* WSSE

Caching
The module can optionally operate with a private cache that
understands the Cache-Control: header and uses both the ETag
and Last-Modified cache validators.
The module can optionally operate with a private cache that
understands the Cache-Control: header and uses both the ETag
and Last-Modified cache validators.
All Methods
The module can handle any HTTP request method, not just GET
The module can handle any HTTP request method, not just GET
and POST.
Redirects
Automatically follows 3XX redirects on GETs.
Compression
Handles both 'deflate' and 'gzip' types of compression.
Lost update support
Automatically adds back ETags into PUT requests to resources
we have already cached. This implements Section 3.2 of
Automatically adds back ETags into PUT requests to resources
we have already cached. This implements Section 3.2 of
Detecting the Lost Update Problem Using Unreserved Checkout.
Unit Tested
A large and growing set of unit tests.
A large and growing set of unit tests.


For more information on this module, see:
Expand All @@ -63,16 +63,16 @@ A simple retrieval:
h = httplib2.Http(".cache")
(resp_headers, content) = h.request("http://example.org/", "GET")

The 'content' is the content retrieved from the URL. The content
The 'content' is the content retrieved from the URL. The content
is already decompressed or unzipped if necessary.

To PUT some content to a server that uses SSL and Basic authentication:

import httplib2
h = httplib2.Http(".cache")
h.add_credentials('name', 'password')
(resp, content) = h.request("https://example.org/chapter/2",
"PUT", body="This is text",
(resp, content) = h.request("https://example.org/chapter/2",
"PUT", body="This is text",
headers={'content-type':'text/plain'} )

Use the Cache-Control: header to control how the caching operates.
Expand All @@ -81,42 +81,42 @@ Use the Cache-Control: header to control how the caching operates.
h = httplib2.Http(".cache")
(resp, content) = h.request("http://bitworking.org/", "GET")
...
(resp, content) = h.request("http://bitworking.org/", "GET",
(resp, content) = h.request("http://bitworking.org/", "GET",
headers={'cache-control':'no-cache'})

The first request will be cached and since this is a request
to bitworking.org it will be set to be cached for two hours,
because that is how I have my server configured. Any subsequent
GET to that URI will return the value from the on-disk cache
and no request will be made to the server. You can use the
Cache-Control: header to change the caches behavior and in
this example the second request adds the Cache-Control:
header with a value of 'no-cache' which tells the library
that the cached copy must not be used when handling this request.
The first request will be cached and since this is a request
to bitworking.org it will be set to be cached for two hours,
because that is how I have my server configured. Any subsequent
GET to that URI will return the value from the on-disk cache
and no request will be made to the server. You can use the
Cache-Control: header to change the caches behavior and in
this example the second request adds the Cache-Control:
header with a value of 'no-cache' which tells the library
that the cached copy must not be used when handling this request.


--------------------------------------------------------------------
Httplib2 Software License

Copyright (c) 2006 by Joe Gregorio

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

20 changes: 10 additions & 10 deletions doc/html/_sources/libhttplib2.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. % Template for a library manual section.
.. % PLEASE REMOVE THE COMMENTS AFTER USING THE TEMPLATE
.. %
.. %
.. % Complete documentation on the extended LaTeX markup used for Python
.. % documentation is available in ``Documenting Python'', which is part
.. % of the standard documentation for Python. It may be found online
.. % at:
.. %
.. %
.. % http://www.python.org/doc/current/doc/doc.html
.. % ==== 0. ====
.. % Copy this file to <mydir>/lib<mymodule>.tex, and edit that file
Expand All @@ -29,15 +29,15 @@
.. % Choose one of these to specify the module module name. If there's
.. % an underscore in the name, use
.. % \declaremodule[modname]{...}{mod_name} instead.
.. %
.. %
.. % not standard, in Python
.. % Portability statement: Uncomment and fill in the parameter to specify the
.. % availability of the module. The parameter can be Unix, IRIX, SunOS, Mac,
.. % Windows, or lots of other stuff. When ``Mac'' is specified, the availability
.. % statement will say ``Macintosh'' and the Module Index may say ``Mac''.
.. % Please use a name that has already been used whenever applicable. If this
.. % is omitted, no availability statement is produced or implied.
.. %
.. %
.. % \platform{Unix}
.. % These apply to all modules, and may be given more than once:
.. % Author of the module code;
Expand Down Expand Up @@ -180,16 +180,16 @@ code indicating an error occured. See

.. % ---- 3.4. ----
.. % Other standard environments:
.. %
.. % classdesc - Python classes; same arguments are funcdesc
.. % methoddesc - methods, like funcdesc but has an optional parameter
.. %
.. % classdesc - Python classes; same arguments are funcdesc
.. % methoddesc - methods, like funcdesc but has an optional parameter
.. % to give the type name: \begin{methoddesc}[mytype]{name}{args}
.. % By default, the type name will be the name of the
.. % last class defined using classdesc. The type name
.. % is required if the type is implemented in C (because
.. % there's no classdesc) or if the class isn't directly
.. % documented (if it's private).
.. % memberdesc - data members, like datadesc, but with an optional
.. % memberdesc - data members, like datadesc, but with an optional
.. % type name like methoddesc.


Expand Down Expand Up @@ -441,8 +441,8 @@ directory ``.cache``. ::
import httplib2
h = httplib2.Http(".cache")
h.add_credentials('name', 'password')
resp, content = h.request("https://example.org/chap/2",
"PUT", body="This is text",
resp, content = h.request("https://example.org/chap/2",
"PUT", body="This is text",
headers={'content-type':'text/plain'} )

Here is an example that connects to a server that supports the Atom Publishing
Expand Down
20 changes: 10 additions & 10 deletions doc/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Index &mdash; httplib2 v0.4 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
Expand All @@ -19,7 +19,7 @@
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="httplib2 v0.4 documentation" href="index.html" />
<link rel="top" title="httplib2 v0.4 documentation" href="index.html" />
</head>
<body>
<div class="related">
Expand All @@ -31,23 +31,23 @@ <h3>Navigation</h3>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
</ul>
</div>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">


<h1 id="index">Index</h1>

<a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#O"><strong>O</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#V"><strong>V</strong></a>
<a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#O"><strong>O</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#V"><strong>V</strong></a>

<hr />


<h2 id="A">A</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl>
Expand Down Expand Up @@ -167,7 +167,7 @@ <h2 id="V">V</h2>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">



<div id="searchbox" style="display: none">
<h3>Quick search</h3>
Expand Down Expand Up @@ -195,7 +195,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
Expand All @@ -204,4 +204,4 @@ <h3>Navigation</h3>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>
</html>
14 changes: 7 additions & 7 deletions doc/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>The httplib2 Library &mdash; httplib2 v0.4 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="httplib2 v0.4 documentation" href="#" />
<link rel="next" title="httplib2 A comprehensive HTTP client library." href="libhttplib2.html" />
<link rel="next" title="httplib2 A comprehensive HTTP client library." href="libhttplib2.html" />
</head>
<body>
<div class="related">
Expand All @@ -35,15 +35,15 @@ <h3>Navigation</h3>
<li class="right" >
<a href="libhttplib2.html" title="httplib2 A comprehensive HTTP client library."
accesskey="N">next</a> |</li>
<li><a href="#">httplib2 v0.4 documentation</a> &raquo;</li>
<li><a href="#">httplib2 v0.4 documentation</a> &raquo;</li>
</ul>
</div>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">

<div class="section" id="the-httplib2-library">
<h1>The httplib2 Library<a class="headerlink" href="#the-httplib2-library" title="Permalink to this headline"></a></h1>
<table class="docutils field-list" frame="void" rules="none">
Expand Down Expand Up @@ -132,7 +132,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="libhttplib2.html" title="httplib2 A comprehensive HTTP client library."
>next</a> |</li>
<li><a href="#">httplib2 v0.4 documentation</a> &raquo;</li>
<li><a href="#">httplib2 v0.4 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
Expand All @@ -141,4 +141,4 @@ <h3>Navigation</h3>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>
</html>
14 changes: 7 additions & 7 deletions doc/html/libhttplib2.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>httplib2 A comprehensive HTTP client library. &mdash; httplib2 v0.4 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="httplib2 v0.4 documentation" href="index.html" />
<link rel="prev" title="The httplib2 Library" href="index.html" />
<link rel="prev" title="The httplib2 Library" href="index.html" />
</head>
<body>
<div class="related">
Expand All @@ -35,15 +35,15 @@ <h3>Navigation</h3>
<li class="right" >
<a href="index.html" title="The httplib2 Library"
accesskey="P">previous</a> |</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
</ul>
</div>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">

<div class="section" id="module-httplib2">
<h1><tt class="xref docutils literal"><span class="pre">httplib2</span></tt> A comprehensive HTTP client library.<a class="headerlink" href="#module-httplib2" title="Permalink to this headline"></a></h1>
<p>The <tt class="xref docutils literal"><span class="pre">httplib2</span></tt> module is a comprehensive HTTP client library with the
Expand Down Expand Up @@ -478,7 +478,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="index.html" title="The httplib2 Library"
>previous</a> |</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
<li><a href="index.html">httplib2 v0.4 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
Expand All @@ -487,4 +487,4 @@ <h3>Navigation</h3>
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>
</html>
Loading

0 comments on commit 2676371

Please sign in to comment.