Fix bugs, tweak API and stuff.

  - Add missing import statement.
  - Add some whitespace.
  - Fix incorrect use of "join".
  - Tweak how HTTP request message bodies are handled.
  - Update documentation.
Expand the module docstring.