Add support for custom JSON encoder. Fix RestAPI constructor. Fix urirequest() to correctly pass all parameter to urlrequest().