(refactor) Use req.url API.

Fixes #6.