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

Also corrected the usage of the request query string; it should be added to the request URL for all request types except POST.