Update the ajax service, allowing more flexible POST requests