uri needs to be quoted: quote(url)