decode response data before parsing JSON