Checks if data is an array. If so, it will build a query, otherwise it will just send the string content (e.g. JSON).