Javascript wrapper to make CORS requests using the verbs GET, POST, PUT and DELETE