blob: 0878dc3d6b2de708e864d870d9dde226a368dc48 [file] [log] [blame]
jcgregorio26c0cd72006-07-03 17:36:17 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<link rel="STYLESHEET" href="ref.css" type='text/css' />
5<link rel="first" href="ref.html" title='The httplib2 Library' />
6<link rel='contents' href='contents.html' title="Contents" />
7<link rel='last' href='about.html' title='About this document...' />
8<link rel='help' href='about.html' title='About this document...' />
9<link rel="next" href="httplib2-example.html" />
10<link rel="prev" href="cache-objects.html" />
11<link rel="parent" href="module-httplib2.html" />
12<link rel="next" href="httplib2-example.html" />
13<meta name='aesop' content='information' />
14<title>1.1.3 Response Objects</title>
15</head>
16<body>
17<DIV CLASS="navigation">
18<div id='top-navigation-panel' xml:id='top-navigation-panel'>
19<table align="center" width="100%" cellpadding="0" cellspacing="2">
20<tr>
21<td class='online-navigation'><a rel="prev" title="1.1.2 Cache Objects"
22 href="cache-objects.html"><img src='previous.png'
23 border='0' height='32' alt='Previous Page' width='32' /></A></td>
24<td class='online-navigation'><a rel="parent" title="1.1 httplib2 A comprehensive"
25 href="module-httplib2.html"><img src='up.png'
26 border='0' height='32' alt='Up One Level' width='32' /></A></td>
27<td class='online-navigation'><a rel="next" title="1.1.4 Examples"
28 href="httplib2-example.html"><img src='next.png'
29 border='0' height='32' alt='Next Page' width='32' /></A></td>
30<td align="center" width="100%">The httplib2 Library</td>
31<td class='online-navigation'><a rel="contents" title="Table of Contents"
32 href="contents.html"><img src='contents.png'
33 border='0' height='32' alt='Contents' width='32' /></A></td>
34<td class='online-navigation'><img src='blank.png'
35 border='0' height='32' alt='' width='32' /></td>
36<td class='online-navigation'><img src='blank.png'
37 border='0' height='32' alt='' width='32' /></td>
38</tr></table>
39<div class='online-navigation'>
40<b class="navlabel">Previous:</b>
41<a class="sectref" rel="prev" href="cache-objects.html">1.1.2 Cache Objects</A>
42<b class="navlabel">Up:</b>
43<a class="sectref" rel="parent" href="module-httplib2.html">1.1 httplib2 A comprehensive</A>
44<b class="navlabel">Next:</b>
45<a class="sectref" rel="next" href="httplib2-example.html">1.1.4 Examples</A>
46</div>
47<hr /></div>
48</DIV>
49<!--End of Navigation Panel-->
50
51<H2><A NAME="SECTION002130000000000000000"></A>
52<A NAME="response-objects"></A>
53<BR>
541.1.3 Response Objects
55</H2>
56
57<P>
58Response objects are derived from <tt class="class">dict</tt> and map
59header names (lower case with the trailing colon removed)
60to header values. In addition to the dict methods
61a Response object also has:
62
63<P>
64<dl><dt><b><tt id='l2h-18' xml:id='l2h-18' class="member">fromcache</tt></b></dt>
65<dd>
66If <code>true</code> the the response was returned from the cache.
67</dl>
68
69<P>
70<dl><dt><b><tt id='l2h-19' xml:id='l2h-19' class="member">version</tt></b></dt>
71<dd>
72The version of HTTP that the server supports. A value
73of 11 means '1.1'.
74</dl>
75
76<P>
77<dl><dt><b><tt id='l2h-20' xml:id='l2h-20' class="member">status</tt></b></dt>
78<dd>
79The numerical HTTP status code returned in the response.
80</dl>
81
82<P>
83<dl><dt><b><tt id='l2h-21' xml:id='l2h-21' class="member">reason</tt></b></dt>
84<dd>
85The human readable component of the HTTP response status code.
86</dl>
87
88<P>
89<dl><dt><b><tt id='l2h-22' xml:id='l2h-22' class="member">previous</tt></b></dt>
90<dd>
91If redirects are followed then the <tt class="class">Response</tt> object returned
92is just for the very last HTTP request and <var>previous</var> points to
93the previous <tt class="class">Response</tt> object. In this manner they form a chain
94going back through the responses to the very first response.
95Will be <code>None</code> if there are no previous respones.
96</dl>
97
98<P>
99
100<DIV CLASS="navigation">
101<div class='online-navigation'>
102<p></p><hr />
103<table align="center" width="100%" cellpadding="0" cellspacing="2">
104<tr>
105<td class='online-navigation'><a rel="prev" title="1.1.2 Cache Objects"
106 href="cache-objects.html"><img src='previous.png'
107 border='0' height='32' alt='Previous Page' width='32' /></A></td>
108<td class='online-navigation'><a rel="parent" title="1.1 httplib2 A comprehensive"
109 href="module-httplib2.html"><img src='up.png'
110 border='0' height='32' alt='Up One Level' width='32' /></A></td>
111<td class='online-navigation'><a rel="next" title="1.1.4 Examples"
112 href="httplib2-example.html"><img src='next.png'
113 border='0' height='32' alt='Next Page' width='32' /></A></td>
114<td align="center" width="100%">The httplib2 Library</td>
115<td class='online-navigation'><a rel="contents" title="Table of Contents"
116 href="contents.html"><img src='contents.png'
117 border='0' height='32' alt='Contents' width='32' /></A></td>
118<td class='online-navigation'><img src='blank.png'
119 border='0' height='32' alt='' width='32' /></td>
120<td class='online-navigation'><img src='blank.png'
121 border='0' height='32' alt='' width='32' /></td>
122</tr></table>
123<div class='online-navigation'>
124<b class="navlabel">Previous:</b>
125<a class="sectref" rel="prev" href="cache-objects.html">1.1.2 Cache Objects</A>
126<b class="navlabel">Up:</b>
127<a class="sectref" rel="parent" href="module-httplib2.html">1.1 httplib2 A comprehensive</A>
128<b class="navlabel">Next:</b>
129<a class="sectref" rel="next" href="httplib2-example.html">1.1.4 Examples</A>
130</div>
131</div>
132<hr />
133<span class="release-info">Release 0.2, documentation updated on July 2, 2006.</span>
134</DIV>
135<!--End of Navigation Panel-->
136
137</BODY>
138</HTML>