A promise based ajax request API