Use URI encoding in request, fix typos

See issue #247