1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
|
<!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:/home/afshar/wrk/gdata-python-client/src/atom/http_core.py">/home/afshar/wrk/gdata-python-client/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 x.__class__.__doc__ 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 x.__class__.__doc__ 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 x.__class__.__doc__ 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>
|