Don't crash if params is an array

The documentation indicates that arrays are a legal input for params:

canvas.put("/api/v1/users/self", [['user[name]', 'Dixon Wilson'],['user[short_name]', 'Dixon']]) # this is synonymous with the previous call

However, the current code assumes params will be a hash. This changes checks the params type.