prepare ajax request