- See Other, 163
unilateral Authorization header, 165
caching and validation
date and time, 159
ETag, 160
If-Modified-Since, 160
If-None-Match, 160
mechanisms, 159
proxy, 161
single permanent version, 159
Vary header, 159
chunked, 154
“Connection: close,” 154
connections, keep-alive,
and httplib, 166
CONNECT method, 155
content encoding, 161
Content-Length header, 154
content negotiation, 161
content types, 163
cookies, 165
CR-LF-CR-LF sequence, 154
DELETE method, 155
document, 151
GET method, 155
HEAD method, 155
HTTP message, 154
OPTIONS method, 155
paths and hosts, 155
ports, 153
POST method, 155
PUT method, 155
Python client libraries, 151
request and response, 153
status codes
3xx status codes, 157
4xx or 5xx status code, 158
200 OK, 156
301 Moved Permanently, 156
- See Other, 156
304 Not Modified, 156
307 Temporary Redirect, 156
400 Bad Request, 156
403 Forbidden, 156
405 Method Not Allowed, 157
500 Server Error, 157
501 Not Implemented, 157
502 Bad Gateway, 157
raise_for_status() method, 158
redirections, 157
Requests library, 157
urlopen(), 158
TRACE method, 155
transfer encoding, 161
HTTPSConnection object, 106
HTTP server
architectures
Apache, 174
async server, 173
CherryPy server, 173
front-end servers, 173
gunicorn server, 173–174
primary designs, 172–173
Python interpreter, 173–174
Varnish server, 173
asynchronous server framework, 171
CGI scripts, 169
do_GET() method, 169
do_POST() method, 169
forward proxies, 172
front-end load balancer, 175
network service, 175
PaaS provider, 175
REST
advantages, 177
benefits, 178
concept, 176
definition, 176
HATEOAS, 178
POST, 177
resources manipulation, 177
REST API, 178
RPC, 177
self-descriptive messages, 177
reverse proxies
benefits, 174
caching-related headers, 172
definition, 172
front-end web server, 172
TLS termination, 172
Varnish server, 173
Standard Library, 169
WSGI
concentric WSGI wrappers, 171
hostnames, 179–180
HTTP response codes, 178
implementation, 170
low-level socket code, 178
parameters, 170
paths, 179–180
pip installation tool, 180
simple Python function, 170
verbose coding style, 179
WebOb/Web Object library, 180
Werkzeug, 181
HTTP version 1.1, 151
Hypertext Markup Language (HTML)
blanket approach, 188
<br> tag, 188
core standards and resources, 188
■ index
351