Update ajax method to work in a Worker on wiht node.js.