Skip to content

Chapter 14: HTTP Web Services #16

@joshuamabina

Description

@joshuamabina

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

  1. 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.

  2. There are five (5) features that all HTTP clients should support. Briefly, help to describe.

  3. Mark so boldly suggests that httplib2 is better than urllib. Expand based on guidelines below:

    1. Like urllib, httplib2 also returns bytes, not strings. Why?
    2. How does caching work on httplib2?
    3. How does httplib2 handle Last-Modified and ETag headers?
    4. How does httplib2 handle compression?
    5. How does httplib2 handle redirects?

External References

  1. https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
  2. https://web.dev/http-cache/
  3. https://stackoverflow.com/questions/3586295/does-urllib2-urlopen-cache-stuff
  4. https://www.mnot.net/cache_docs/
  5. https://github.com/httplib2/httplib2/wiki/Examples-Python3

Metadata

Metadata

Assignees

Labels

class notesNew class notes or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions