Looking more deeply into the functional view

Both HTTP responses and requests have headers separate from the body. The request can also have some attached form data or other uploads. Therefore, we can think of a web server like this:

headers, content = httpd(headers, request, [form or uploads])  

The request headers may include cookie values, which can be seen as adding yet more arguments. Additionally, a web server is often dependent on the OS environment in which it's running. This OS environment data can be considered as yet more arguments being provided as part of the request.

There's a large but reasonably well-defined spectrum of content. The Multipurpose Internet Mail Extension (MIME) types define the kinds of content that a web service ...

Get Functional Python Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.