use request instead of $.ajax