Added the ability to pass an object to the 'data' parameter

Also corrected the usage of the request parameters; they have to be added to the request URL for all request types except POST.