Allow for overriding the ajax function on a per-call basis.