You can probably use omee. Its a single file containing many frequently used javascript functions like ajax request.
https://github.com/agaase/omee/blob/master/src/omee.js
to raise an ajax request you just call
omee.raiseAjaxRequest
with arguments
params- parameters list e.g param1=param1value¶m2=param2value
url - url to hit the server
func- function name which is to be called back
connType - GET/POST.