Philosophically, I can describe HTTP web services in 12 words: exchanging data with remote servers using nothing but the operations of HTTP. - Mark Pilgrim
Source: https://diveintopython3.net/http-web-services.html
Review Questions
-
In the words of the author, 304: Not Modified means *"same shit, different day." (a) Discuss what he means (b) Describe when the statement does not apply.
-
There are five (5) features that all HTTP clients should support. Briefly, help to describe.
-
Mark so boldly suggests that httplib2 is better than urllib. Expand based on guidelines below:
- Like
urllib, httplib2 also returns bytes, not strings. Why?
- How does caching work on
httplib2?
- How does
httplib2 handle Last-Modified and ETag headers?
- How does
httplib2 handle compression?
- How does
httplib2 handle redirects?
External References
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
- https://web.dev/http-cache/
- https://stackoverflow.com/questions/3586295/does-urllib2-urlopen-cache-stuff
- https://www.mnot.net/cache_docs/
- https://github.com/httplib2/httplib2/wiki/Examples-Python3
Source: https://diveintopython3.net/http-web-services.html
Review Questions
In the words of the author,
304: Not Modifiedmeans *"same shit, different day." (a) Discuss what he means (b) Describe when the statement does not apply.There are five (5) features that all HTTP clients should support. Briefly, help to describe.
Mark so boldly suggests that
httplib2is better thanurllib. Expand based on guidelines below:urllib,httplib2also returns bytes, not strings. Why?httplib2?httplib2handleLast-ModifiedandETagheaders?httplib2handle compression?httplib2handle redirects?External References