| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: module atom.http_core</title> |
| </head><body bgcolor="#f0f0f8"> |
| |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| <tr bgcolor="#7799ee"> |
| <td valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="atom.html"><font color="#ffffff">atom</font></a>.http_core</strong></big></big></font></td |
| ><td align=right valign=bottom |
| ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/afshar/src/external-gdata-release/google3/src/atom/http_core.py">/usr/local/google/home/afshar/src/external-gdata-release/google3/src/atom/http_core.py</a></font></td></tr></table> |
| <p><tt># Copyright (C) 2009 Google Inc.<br> |
| #<br> |
| # Licensed under the Apache License, Version 2.0 (the "License");<br> |
| # you may not use this file except in compliance with the License.<br> |
| # You may obtain a copy of the License at<br> |
| #<br> |
| # <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br> |
| #<br> |
| # Unless required by applicable law or agreed to in writing, software<br> |
| # distributed under the License is distributed on an "AS IS" BASIS,<br> |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br> |
| # See the License for the specific language governing permissions and<br> |
| # limitations under the License.</tt></p> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#aa55cc"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
| <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br> |
| <a href="httplib.html">httplib</a><br> |
| </td><td width="25%" valign=top><a href="os.html">os</a><br> |
| <a href="ssl.html">ssl</a><br> |
| </td><td width="25%" valign=top><a href="urllib.html">urllib</a><br> |
| <a href="urlparse.html">urlparse</a><br> |
| </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ee77aa"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| <td width="100%"><dl> |
| <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="atom.http_core.html#HttpClient">HttpClient</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="atom.http_core.html#ProxiedHttpClient">ProxiedHttpClient</a> |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="atom.http_core.html#HttpRequest">HttpRequest</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="atom.http_core.html#HttpResponse">HttpResponse</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="atom.http_core.html#Uri">Uri</a> |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="atom.http_core.html#Error">Error</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="atom.http_core.html#ProxyError">ProxyError</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="atom.http_core.html#UnknownSize">UnknownSize</a> |
| </font></dt></dl> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="atom.http_core.html#Error">Error</a></dd> |
| <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#Error-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| </dl> |
| <dl><dt><strong>args</strong></dt> |
| </dl> |
| <dl><dt><strong>message</strong></dt> |
| </dl> |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="HttpClient">class <strong>HttpClient</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Performs HTTP requests using httplib.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="HttpClient-Request"><strong>Request</strong></a> = <a href="#HttpClient-request">request</a>(self, http_request)</dt></dl> |
| |
| <dl><dt><a name="HttpClient-request"><strong>request</strong></a>(self, http_request)</dt></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Data and other attributes defined here:<br> |
| <dl><dt><strong>debug</strong> = None</dl> |
| |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="HttpRequest">class <strong>HttpRequest</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Contains all of the parameters for an HTTP 1.1 request.<br> |
| <br> |
| The HTTP headers are represented by a dictionary, and it is the<br> |
| responsibility of the user to ensure that duplicate field names are combined<br> |
| into one header value according to the rules in section 4.2 of <a href="http://www.rfc-editor.org/rfc/rfc2616.txt">RFC 2616</a>.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="HttpRequest-AddBodyPart"><strong>AddBodyPart</strong></a> = <a href="#HttpRequest-add_body_part">add_body_part</a>(self, data, mime_type, size<font color="#909090">=None</font>)</dt></dl> |
| |
| <dl><dt><a name="HttpRequest-AddFormInputs"><strong>AddFormInputs</strong></a> = <a href="#HttpRequest-add_form_inputs">add_form_inputs</a>(self, form_data, mime_type<font color="#909090">='application/x-www-form-urlencoded'</font>)</dt></dl> |
| |
| <dl><dt><a name="HttpRequest-__init__"><strong>__init__</strong></a>(self, uri<font color="#909090">=None</font>, method<font color="#909090">=None</font>, headers<font color="#909090">=None</font>)</dt><dd><tt>Construct an HTTP request.<br> |
| <br> |
| Args:<br> |
| uri: The full path or partial path as a <a href="#Uri">Uri</a> <a href="__builtin__.html#object">object</a> or a string.<br> |
| method: The HTTP method for the request, examples include 'GET', 'POST',<br> |
| etc.<br> |
| headers: dict of strings The HTTP headers to include in the request.</tt></dd></dl> |
| |
| <dl><dt><a name="HttpRequest-add_body_part"><strong>add_body_part</strong></a>(self, data, mime_type, size<font color="#909090">=None</font>)</dt><dd><tt>Adds data to the HTTP request body.<br> |
| <br> |
| If more than one part is added, this is assumed to be a mime-multipart<br> |
| request. This method is designed to create MIME 1.0 requests as specified<br> |
| in <a href="http://www.rfc-editor.org/rfc/rfc1341.txt">RFC 1341</a>.<br> |
| <br> |
| Args:<br> |
| data: str or a file-like <a href="__builtin__.html#object">object</a> containing a part of the request body.<br> |
| mime_type: str The MIME type describing the data<br> |
| size: int Required if the data is a file like <a href="__builtin__.html#object">object</a>. If the data is a<br> |
| string, the size is calculated so this parameter is ignored.</tt></dd></dl> |
| |
| <dl><dt><a name="HttpRequest-add_form_inputs"><strong>add_form_inputs</strong></a>(self, form_data, mime_type<font color="#909090">='application/x-www-form-urlencoded'</font>)</dt><dd><tt>Form-encodes and adds data to the request body.<br> |
| <br> |
| Args:<br> |
| form_data: dict or sequnce or two member tuples which contains the<br> |
| form keys and values.<br> |
| mime_type: str The MIME type of the form data being sent. Defaults<br> |
| to 'application/x-www-form-urlencoded'.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Data and other attributes defined here:<br> |
| <dl><dt><strong>method</strong> = None</dl> |
| |
| <dl><dt><strong>uri</strong> = None</dl> |
| |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="HttpResponse">class <strong>HttpResponse</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="HttpResponse-__init__"><strong>__init__</strong></a>(self, status<font color="#909090">=None</font>, reason<font color="#909090">=None</font>, headers<font color="#909090">=None</font>, body<font color="#909090">=None</font>)</dt></dl> |
| |
| <dl><dt><a name="HttpResponse-getheader"><strong>getheader</strong></a>(self, name, default<font color="#909090">=None</font>)</dt></dl> |
| |
| <dl><dt><a name="HttpResponse-getheaders"><strong>getheaders</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="HttpResponse-read"><strong>read</strong></a>(self, amt<font color="#909090">=None</font>)</dt></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Data and other attributes defined here:<br> |
| <dl><dt><strong>reason</strong> = None</dl> |
| |
| <dl><dt><strong>status</strong> = None</dl> |
| |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="ProxiedHttpClient">class <strong>ProxiedHttpClient</strong></a>(<a href="atom.http_core.html#HttpClient">HttpClient</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="atom.http_core.html#ProxiedHttpClient">ProxiedHttpClient</a></dd> |
| <dd><a href="atom.http_core.html#HttpClient">HttpClient</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="atom.http_core.html#HttpClient">HttpClient</a>:<br> |
| <dl><dt><a name="ProxiedHttpClient-Request"><strong>Request</strong></a> = request(self, http_request)</dt></dl> |
| |
| <dl><dt><a name="ProxiedHttpClient-request"><strong>request</strong></a>(self, http_request)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="atom.http_core.html#HttpClient">HttpClient</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Data and other attributes inherited from <a href="atom.http_core.html#HttpClient">HttpClient</a>:<br> |
| <dl><dt><strong>debug</strong> = None</dl> |
| |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="ProxyError">class <strong>ProxyError</strong></a>(<a href="atom.http_core.html#Error">Error</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="atom.http_core.html#ProxyError">ProxyError</a></dd> |
| <dd><a href="atom.http_core.html#Error">Error</a></dd> |
| <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Data descriptors inherited from <a href="atom.http_core.html#Error">Error</a>:<br> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><a name="ProxyError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#ProxyError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><a name="ProxyError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="ProxyError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="ProxyError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| |
| <dl><dt><a name="ProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| </dl> |
| <dl><dt><strong>args</strong></dt> |
| </dl> |
| <dl><dt><strong>message</strong></dt> |
| </dl> |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="UnknownSize">class <strong>UnknownSize</strong></a>(<a href="atom.http_core.html#Error">Error</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="atom.http_core.html#UnknownSize">UnknownSize</a></dd> |
| <dd><a href="atom.http_core.html#Error">Error</a></dd> |
| <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Data descriptors inherited from <a href="atom.http_core.html#Error">Error</a>:<br> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><a name="UnknownSize-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#UnknownSize-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><a name="UnknownSize-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="UnknownSize-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="UnknownSize-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#UnknownSize-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| |
| <dl><dt><a name="UnknownSize-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| </dl> |
| <dl><dt><strong>args</strong></dt> |
| </dl> |
| <dl><dt><strong>message</strong></dt> |
| </dl> |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="Uri">class <strong>Uri</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>A URI as used in HTTP 1.1<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Uri-ModifyRequest"><strong>ModifyRequest</strong></a> = <a href="#Uri-modify_request">modify_request</a>(self, http_request<font color="#909090">=None</font>)</dt></dl> |
| |
| <dl><dt><a name="Uri-__init__"><strong>__init__</strong></a>(self, scheme<font color="#909090">=None</font>, host<font color="#909090">=None</font>, port<font color="#909090">=None</font>, path<font color="#909090">=None</font>, query<font color="#909090">=None</font>)</dt><dd><tt>Constructor for a URI.<br> |
| <br> |
| Args:<br> |
| scheme: str This is usually 'http' or 'https'.<br> |
| host: str The host name or IP address of the desired server.<br> |
| post: int The server's port number.<br> |
| path: str The path of the resource following the host. This begins with<br> |
| a /, example: '/calendar/feeds/default/allcalendars/full'<br> |
| query: dict of strings The URL query parameters. The keys and values are<br> |
| both escaped so this dict should contain the unescaped values.<br> |
| For example {'my key': 'val', 'second': '!!!'} will become<br> |
| '?my+key=val&second=%21%21%21' which is appended to the path.</tt></dd></dl> |
| |
| <dl><dt><a name="Uri-__str__"><strong>__str__</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="Uri-modify_request"><strong>modify_request</strong></a>(self, http_request<font color="#909090">=None</font>)</dt><dd><tt>Sets HTTP request components based on the URI.</tt></dd></dl> |
| |
| <hr> |
| Static methods defined here:<br> |
| <dl><dt><a name="Uri-ParseUri"><strong>ParseUri</strong></a> = parse_uri(uri_string)</dt><dd><tt>Creates a <a href="#Uri">Uri</a> <a href="__builtin__.html#object">object</a> which corresponds to the URI string.<br> |
| <br> |
| This method can accept partial URIs, but it will leave missing<br> |
| members of the <a href="#Uri">Uri</a> unset.</tt></dd></dl> |
| |
| <dl><dt><a name="Uri-parse_uri"><strong>parse_uri</strong></a>(uri_string)</dt><dd><tt>Creates a <a href="#Uri">Uri</a> <a href="__builtin__.html#object">object</a> which corresponds to the URI string.<br> |
| <br> |
| This method can accept partial URIs, but it will leave missing<br> |
| members of the <a href="#Uri">Uri</a> unset.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Data and other attributes defined here:<br> |
| <dl><dt><strong>host</strong> = None</dl> |
| |
| <dl><dt><strong>path</strong> = None</dl> |
| |
| <dl><dt><strong>port</strong> = None</dl> |
| |
| <dl><dt><strong>scheme</strong> = None</dl> |
| |
| </td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#eeaa77"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt><a name="-ParseUri"><strong>ParseUri</strong></a> = parse_uri(uri_string)</dt><dd><tt>Creates a <a href="#Uri">Uri</a> <a href="__builtin__.html#object">object</a> which corresponds to the URI string.<br> |
| <br> |
| This method can accept partial URIs, but it will leave missing<br> |
| members of the <a href="#Uri">Uri</a> unset.</tt></dd></dl> |
| <dl><dt><a name="-get_headers"><strong>get_headers</strong></a>(http_response)</dt><dd><tt>Retrieves all HTTP headers from an HTTP response from the server.<br> |
| <br> |
| This method is provided for backwards compatibility for Python2.2 and 2.3.<br> |
| The httplib.HTTPResponse <a href="__builtin__.html#object">object</a> in 2.2 and 2.3 does not have a getheaders<br> |
| method so this function will use getheaders if available, but if not it<br> |
| will retrieve a few using getheader.</tt></dd></dl> |
| <dl><dt><a name="-parse_uri"><strong>parse_uri</strong></a>(uri_string)</dt><dd><tt>Creates a <a href="#Uri">Uri</a> <a href="__builtin__.html#object">object</a> which corresponds to the URI string.<br> |
| <br> |
| This method can accept partial URIs, but it will leave missing<br> |
| members of the <a href="#Uri">Uri</a> unset.</tt></dd></dl> |
| </td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#55aa55"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
| <td width="100%"><strong>MIME_BOUNDARY</strong> = 'END_OF_PART'<br> |
| <strong>__author__</strong> = 'j.s@google.com (Jeff Scudder)'</td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#7799ee"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| <td width="100%">j.s@google.com (Jeff Scudder)</td></tr></table> |
| </body></html> |